Basic JavaScript - Assigning the Value of One Variable to Another

Tell us what’s happening:
Describe your issue in detail here.
This is the hint I got when my code failed:

a should be assigned to b with = .

a = b;

isn’t that right? I stuck and need help.
Your code so far

// Setup
var a;
a = 7;
var b;
a = b;
// Only change code below this line
var b;
b = 7;
var a;
a = b;


Your browser information:

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

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

Link to the challenge:

let me rephrase this to:

the value of a should be given to the memory space called b

(all variables are essentially spaces in memory. So you have one called a and you have one called b)

so we want to get the information stored in a
and put it inside b

the exercise also repeats this when they say

Assign the contents of a to variable b .

1 Like

OMG @hbar1st thanks so much, I’m on track now :sunglasses:

1 Like