Tell us what’s happening:
Describe your issue in detail here.
Your code so far
// Setup
var a;
a = 7;
var b;
// Only change code below this line
var b = 7;
var a = b;
b = a;
Why do we assign b = a instead of a = b?
If var b = 7 and a = b, doesn’t logic follow that a = 7?
I’m confused on why it’s b = a. We haven’t assigned any value to a.
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Assigning the Value of One Variable to Another
Link to the challenge: