Understanding Uninitialized Variables-stuck

Understanding Uninitialized Variables-stuck
0.0 0

#1

Tell us what’s happening:

Your code so far

// Initialize these three variables
var a = 6;
var b = 15;
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 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36.

Link to the challenge:

Hi,

I gotta say, everything up until the JS stuff was very well written,this stuff is confusing me, does anyone know what i’m doing wrong here?

Thanks in advance


#2

Instructions

Initialize the three variables a, b, and c with 5, 10, and "I am a" respectively so that they will not be undefined.

You haven’t followed these instructions.


#3

@nightcoder21, you are initializing the variables just fine - you’re just putting the wrong values in!

What were the reasons behind you choosing these values?

var a = 6; // this assigns the value 6 to variable a. What value do you want a to have?
var b = 15;

Think through that and what the challenge is asking you to do and you’ll figure it out