Understanding Uninitialized Variables.....Please co-operate with me to write codes

Understanding Uninitialized Variables.....Please co-operate with me to write codes
0

#1

Tell us what’s happening:

Your code so far


// Initialize these three variables
var a="myVar";
var b ;
var c;

if (b === 15) {
    b = "defined";
} else {
    b = "undefined";
}

// Do not change code below this line

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

Your browser information:

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

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


#2

What is your question?


#3

I have to do as per question “b should be defined and evaluate the value 15”
how can I do this?


#4

Well, just like a = “myVar” , b needs to equal 15.


#5

If I write b=15,code can’t run too.


#6

It tells you what a, b and c should be at the end of the instructions, you needs to fill those values in.

a should not be "myVar", for example, that’s not the value it asks you for. b should not be 15, that’s just the value it is after you add 5 to it.


#7

You should assign a value for b such that it adds up to 15 !