question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tests are wrongly passed for the "Storing Values with the Assignment Operator" challenge

See original GitHub issue

Issue Description

  • When Issue Happens : Every time
  • Steps To Reproduce : Assign the value of 7 to b. The next line has the code b = a; On running the tests, it finds the value of ‘a’ to be ‘undefined’ and the value of ‘b’ as 7. -> If the line b = a; is present and is not commented out, it passes all the test cases. -> If the line b = a; is commented out, it still passes all the test cases. -> If the line b = a; is removed the test “a should be assigned to b with =” does not pass.

Browser Information

  • Browser Name, Version : Google Chrome, 49.0.2623.110 (64-bit)
  • Operating System : Ubuntu 14.04

Your Code

// Setup
var a;
var b = 2;

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

Screenshot

freecodecamperror1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
RobAK84commented, Oct 10, 2016

your should put b = 7; after a = 7;

a = 7; b = 7; // b = a; there u go

1reaction
erictleungcommented, Apr 7, 2016

@jnmorse head over to https://gitter.im/FreeCodeCamp/HelpContributors for help on local instances.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest JavaScript topics - The freeCodeCamp Forum
Code doesn't run, but I pass the challenge. ... (Help Needed) Basic JavaScript: Storing Values with the Assignment Operator ... Tests not passing....
Read more >
Walmart Assessment Test 2022 - All You Need to Pass the Test
Get to know each and every one of Walmart's assessment tests in this video. For more information on Walmart's tests, visit our dedicated ......
Read more >
Unit Tests, How to Write Testable Code, and Why It Matters
If the observed behavior is consistent with the expectations, the unit test passes, otherwise, it fails, indicating that there is a problem somewhere...
Read more >
security specialist superbadge challenge 2
the second field will be: Field = Stage, Operator = Equals, Value ... guys to save you some time, so for people who...
Read more >
Storing data in variables - Khan Academy
How do we make sure the computer is actually storing those values in memory? ... a variable to a new value using code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found