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.

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

See original GitHub issue

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;

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

5reactions
sujeet100commented, Jun 15, 2016

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;
0reactions
Parajuxcommented, Aug 10, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Storing Values With the assignment Operator - GitHub
In JavaScript, you can store a value in a variable with the assignment operator. myVariable = 5; Assigns the Number value 5 to...
Read more >
Assignment operator overload : Error Handling scenario
Assigning Obj2 to Obj1 . During assigning (in assignment operator overload function) first we free Obj1 and then recreate Obj1 with Obj2 values....
Read more >
Solved I do not get why the above code prints "Success".
Option A is correct, It prints Success is correct, boolean b is storing the value false, But in if condition the condition is...
Read more >
about Assignment Operators - PowerShell | Microsoft Learn
The assignment by subtraction operator -= decrements the value of a variable by the value that's specified on the right side of the...
Read more >
1.4 — Variable assignment and initialization - Learn C++
After a variable has been defined, you can give it a value (in a separate statement) using the = operator. This process is...
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