Java script and date stuctures

Tell us what’s happening:
what code to put

** ```
var myVar;
myVar = 5;
var myNum;
myNum = myVar;


```js

// Setup
var a;
a = 7;
var b;

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

a = 5; // The variable 'a' is equal to 5

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36

Challenge: Assigning the Value of One Variable to Another

Link to the challenge:

Hi @ramdubey !

We don’t hand out full solutions on the forum.
Instead, we help guide posters to the correct solution.
For future posts, please be more descriptive on what you need help with.

I would suggest reseting the lesson.
Your answer only needs to be one line.
The task is to assign the contents of variable a to b.

It would help to look at the FCC example again and understand how it works.

// Setup
var myVar;
myVar = 5;
var myNum;

// this line of code assigns the contents of myVar to myNum
myNum = myVar;

Hope that helps!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.