What does this JavaScript code log and why?
Codeguage

Codeguage @codeguage

About: An online platform dedicated to helping programmers become fundamentally-sound 💪

Joined:
Mar 14, 2022

What does this JavaScript code log and why?

Publish Date: Feb 5 '24
0 0

Q. What does the following code log?

var s = 'Good';
s[0] = 'F';

console.log(s);
Enter fullscreen mode Exit fullscreen mode

Why is the output what it is?

Comments 0 total

    Add comment