Understanding Uninitialized Variables need help

Understanding Uninitialized Variables need help
0

#1

Tell us what’s happening:

Your code so far


// Initialize these three variables
var a;
var b;
var c;

// Do not change code below this line

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

var a=6;
var b=15;
var c = "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/69.0.3497.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables/


#2

It doesn’t work when i put my code and the top of the page where their is var a;, var b; …


#3

Read the challenge description.


#4

hmm confused
what should i exactly do


#5

You have to give those variables some values, according to the challenge description, a should equal 5, b should equal 10, and c should equal “I am a” string.

You can do it like this:

var a = 5
var b = 10
var c = "I am a"

#6

but that is what i did before, it didn’t worked


#7

Did you get it to work now? You probably just misplaced the code. The entire thing should look like this:

// 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!";