Understanding Uninitialized Variables

Understanding Uninitialized Variables
0

#1

Tell us what’s happening:
As far as I can tell I have the solution correct. Bu running the code isnt working

Your code so far

// Initialize these three variables
var a; 5;
var b; 10;
var c; " I am a";

// Do not change code below this line

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

Your browser information:

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

Link to the challenge:


#2

You have 3 syntax errors and 1 typo.

Hint for the 3 syntax errors:

When we initialize a variable, we actually assign a value to it at the time of declaration. Do you remember from the previous challenges how to assign a value to a variable?

Hint for the 1 typo:

Look carefully at the string “I am a” (from the instructions) and then compare that with the string you created.


#3

// Initialize these three variables
var a = 5;
var b = 10;
var c = “i am a”;
// Do not change code below this line
a = a + 1;
b = b + 5;
c = c + " String!";
What is wrong with this?


#4

Check your “i am a” it should be a capital letter I instead of i.