Help on Storing Values with the Assignment Operator

Help on Storing Values with the Assignment Operator
0.0 0

#1

**Tell us what’s happening:**Anybody with a hint on how to get this right? How do i assign variable a to variable b? Ive tried using a=b, but for some reason it says im wrong.

Your code so far


// Setup
var a;
var b = 2;

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator


#2

assign a variable like this:

a = b;

This will make ‘a’ hold the value of ‘b’.


#3

Tried it but it doesnt work.


#4

It’s the other way around. b should hold the value of a


#5

Assign the contents of a to variable b.


#6

You were told to assign a to b not b to a.
Try this.
b = a;


#7

Thanks everyone. Got It. #need to pay more attention to detail