Understanding Uninitialized Variables in JS

Hi guys,I just started learning JS,I am having a problem with understanding uninitialized variables.I have done var a and var b.I am having a problem with var c.I have put var c= “I am a string!” on var c but it is not correct.I do not know what I have done wrong and will like if you can be of assistance,Thanks.

This is my code so far:


// Only change code below this line
var a;
var b;
var c;
// Only change code above this line

a = a + 1;
b = b + 5;
c = c + " String!";
var a=6
var b=15
var c= "I am a string!"

Whenever you see these comments, you must respect them or the code will fail.

This challenge is asking you to set the initial values of a, b, and c so that when the second half of the code is run, the values in a, b, and c match the requested values.

You should only change the code here, adding = PutYourInitalizationValueHere; to each line with the appropriate value.

1 Like

Thanks,I will do that.