Basic JavaScript - Assigning the Value of One Variable to Another

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

Your code so far
help me understand this

var a;
a=7;
var b;
ab = a;


// Only change code below this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Assigning the Value of One Variable to Another

Link to the challenge:

the variable whos name is a points to the number 7.
you are asked to assign a variable called b to the contents of a, in other words, what it points to.
therefore, below the line where is says
// Only change code below this line
you can write
b = a

this means that b points to a,
and a points to 7
so, eventually, b will return 7

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