Javascript Uninitialized Variables

Tell us what’s happening:

Uninitialized Variables
var c returns undefined

Your code so far

// Only change code below this line
var a;
var b;
var c;
// Only change code above 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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Safari/537.36

Challenge: Understanding Uninitialized Variables

Link to the challenge:

This is not what the instructions told you to do.

I tried using var a = 5, var b = 10, and var c = " I am a" but it all return undefined

Did you try making those changes here?

Thanks Sir . it has been solved

1 Like