Understanding Uninitialized Variables MyOutput

**Tell us what’s happening:**I have tried all I can.
var a=5;

var b=10;

var c = “I am a”;

// Only change code above this line

a = a + 1;

b = b+ 5;

c = c + “String!”;
Describe your issue in detail here.

Your code so far


// Only change code below this line
var a=5;
var b=10;
var c = "I am a"; 

// Only change code above this line

a = a + 1;
b = b+ 5;
c = c + "String!";

c

should not contain

undefined

and should have a value of the string

I am a String!

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36

Challenge: Understanding Uninitialized Variables

Link to the challenge:

You have two tests failing:

c should not contain undefined and should have a value of the string I am a String!

You should not change code below the specified comment

The first one is failing because you didn’t follow the second one. You should not change anything below the “// Only change code above this line”. Part of being a successful web dev is reading and understanding fine details.

You can reset the code and start over or just “fix” the parts that you changed. The line b = b+ 5; should have a space before the “+” and the line c = c + "String!"; should have a space before the “S”.

If I fix those, your code passes for me.

2 Likes