Challenge Storing Values with the Assignment Operator has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
Write the code I've written below and attempt to run the test.
My code:
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var b = var a;
The code you have mentioned has got a syntax error and hence no tests would be run.
I think the code stub has intentionally kept the syntax error, so that students can resolve it, before running any tests.
If you change your code to following, then the tests would pass.
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var b = a;
Please use the Help chat room for getting challenge related help. Happy Coding!
I have also run into the issue described above even without the syntax error.
// Setup
var a;
var b = 2;
// Only change code below this line
b += 5;
a = b;
here is the answer
removed solution by mod
First pass:
a = 7; b = 7;
// ^^^^^ Read.
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var blank = blank;
i had problem with this but after a while I tried :
// Setup
var a;
var b = 2;
// Only change code below this line
var a = 7;
var b = a;
and it worked.
Most helpful comment
The code you have mentioned has got a syntax error and hence no tests would be run.
I think the code stub has intentionally kept the syntax error, so that students can resolve it, before running any tests.
If you change your code to following, then the tests would pass.