Possible beginner javascript tutorial bug please help


#1

i am a noob but i took the beginner course on codeacademy and i cant understand why this wont work its like the second or third question i feel really stupid and i cant seem to understand what is apparently supposed to be very simple please help thank you.

Assign the value 7 to variable a.

Assign the contents of a to variable b.

Do not change code above the line
a should have a value of 7
b should have a value of 7
a should be assigned to b with =

b=7;
1

2
// Setup
3
var a;
4
var b = 2;
5

6
// Only change code below this line
7
b=7;
8
a=b;
9

10

11

12
​//the only one that shows up as incorrect is the “a should be assigned to b with =” requirement.


#2

a should be assigned to b means b=a. You’ve assigned it the other way, a=b. While technically it does the same thing, it looks like they want to teach you some code ordering.

So, I would rewrite it this way:

a = 7;
b = a;

If that doesn’t pass, I’d love to have a look at the actual challenge… if a public link is available.