Storing Values with the Assignment

Storing Values with the Assignment
0

#1

Tell us what’s happening:
cant figuree out how to put a=b can someone help

Your code so far

// Setup
var a;
var b = 2;

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36.

Link to the challenge:


#2

A couple of things:

the var keyword initialises / declares a variable. Once a variable has been declared, you shouldn’t re-declare it.

So if I set a variable and reassign the variable like this:

var myVariable = 'This is the initial value';

myVariable = 'Now the value has changed';

Now re-visit the challenge and see if you can reassign the values of a and b.