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!";
a=6;
b=15;
c = "I am 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
I don’t understand why this is not working properly.
Even when i put var next to a ,b i doesn’t work
The instructions indicate that you are not to change code below a certain line which you have. It is probably best to use the Reset All Code button to restore your workspace.
Here is an example to help you
var x; //this variable is declared but it is not initialized
var y = 5; // this variable is declared and initialized to 5
y = y + 2; // now y is 7
Here is a walk-through of the challenge
You have to initialize these three variables to some values
// Initialize these three variables
var a; //change this line to initialize a
var b; //change this line to initialize b
var c; //change this line to initialize c
so that after the below code completes
a = a + 1;
b = b + 5;
c = c + " String!";
value of a will be 6, value of b will 15 and value of c will be “I am a string”