Freecodecamp: Unable to succeed at "Storing Values with the Assignment Operator"

Created on 15 Jun 2016  路  7Comments  路  Source: freeCodeCamp/freeCodeCamp

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;

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.

// Setup
var a;
var b = 2;

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

All 7 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

QuincyLarson picture QuincyLarson  路  3Comments

jurijuri picture jurijuri  路  3Comments

trashtalka3000 picture trashtalka3000  路  3Comments

danielonodje picture danielonodje  路  3Comments

kokushozero picture kokushozero  路  3Comments