Tell us what’s happening:
Describe your issue in detail here.
Your code so far
a = 7;
// Only change code below this line
var b = 7
var a =
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36
Challenge: Assigning the Value of One Variable to Another
Link to the challenge:
Look at the instructions. You have “wired”
a to the value 7, now can you think of a way to “wire” the variable
You’re not being asked to explicitly duplicate whatever you see in a over into b, you’re being asked to connect them by assigning b…well, some variable, rather than a hard-coded value.
im trying hard to think it through, could you be more explicit please
First of all, variables are alredy declared, so you don’t need to use the restricted word “var” again below the second comment section.
Then we already know that
a=7 and to pass this test, we must to:
1- `b` should have a value of `7` .
2- `a` should be assigned to `b` with `=` .
And that is the same as just doing the #2 thing…
var b= 7;
still finding troubles nesting the characters
finally got it
var a = var b
This line is where the problem happens. You’re reading the value that’s been assigned to a, and you’re explicitly assigning that value to b.
Without all the var. You only need to use var to create the variable, so only the once.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.