Basic JavaScript - Understanding Uninitialized Variables

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

// Only change code below this line
var 5;
var 15;
var c="undefined";
// Only change code above 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; rv:105.0) Gecko/20100101 Firefox/105.0

Challenge: Basic JavaScript - Understanding Uninitialized Variables

Link to the challenge:

Make sure 5 and 15 values are assigned to var a and var b, respectively.

1 Like

instead of var 5 write var a=5;
here we declared variable a and assigned it value 5
same with next two lines
var b=15;
var c="I am ";

1 Like

Here you declared 15 and 5 but in which variable.you had not assigned any variable for 5,15 as there in next step you had given a ,b
But in above you had not declared a ,b .
As per my observation you should assign var a=5,var b=15;

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.