Basic JavaScript - Assigning the Value of One Variable to Another

I was told to assign the content of A to the variable B

I did it bit is not working yet.

  • You should not change code above the specified comment.

  • Passed:b should have a value of 7.

  • Failed:a should be assigned to b with =.

Your browser information:

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

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

Link to the challenge:

It is basically β€œb = a” below the line that says β€œOnly change code below this line”.

Here β€˜a’ has a value of 7, while β€˜b’ has no value. When you put β€˜b = a’ you are assigning the value of β€˜a’ to β€˜b’, just like, for example, β€˜b = 7’.

1 Like

Thanks so much sir. Actually this stuff disturbed me alot today.

1 Like