Tell us what’s happening:
Your code so far
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var b = 7;
var a = b
I don't know what happened to my js code when I try to assign a to b with var a = b;
Tell us what’s happening:
Your code so far
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var b = 7;
var a = b
I don't know what happened to my js code when I try to assign a to b with var a = b;
The var
keyword is used only once per variable, when the variable is first declared.
Could you show me how is the right script , please?
Remove the inappropriate var
s from your code.
Is the code like this?
// Setup
var a;
var b = 2;
// Only change code below this line
a = 7;
b = 7;
a = b;
Please do not create multiple threads for the same topic. I have merged your forum threads.
What problems are you having with your most recent solution attempt?