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.

Increment Number with Java Script

See original GitHub issue

Issue Description

This was my problem. how would i change myVar =myVar it will be kidding me and dosen’t allow me to pass the challenge. So, on a humble request please help me out.

Browser Information

Java Script Increment Number with Java Script chalenge .

  • Browser Name Firefox, Version 52.2:
  • Operating System Windows 7:
  • Mobile 8871135429, Desktop

Your Code

 
var myVar = 87;


// Only change code below this line
myVar = ++myVar;


 
 

Screenshot

untitled

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Shubhamkumarsinghcommented, Dec 16, 2016

No it is a bug. And i am unable to resolve it.

0reactions
aquasauriouscommented, Dec 27, 2016

I thought it was a bug at first, but then I re-read the text to the left. OP’s code would work IRL, but there is another way to answer the question, and you’ll see it when you read the explanation.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Increment (++) - JavaScript - MDN Web Docs - Mozilla
The increment (++) operator increments (adds one to) its operand and returns the value before or after the increment, depending on where the...
Read more >
Increment a Number with JavaScript - CodeChallenge - GitHub
Increment a Number with JavaScript. You can easily increment or add one to a variable with the ++ operator. i++;.
Read more >
JavaScript Increment ++ and Decrement -- | by Brandon Morelli
The increment and decrement operators in JavaScript will add one (+1) or subtract one (-1), respectively, to their operand, and then return a ......
Read more >
javascript onclick increment number - Stack Overflow
'Plain' JavaScript Example · <input type="button" value="Increase" id="inc" onclick="incNumber()"/> · <input type="button" value="Decrease" id=" ...
Read more >
Basic JavaScript: Increment a Number with JavaScript
Basic JavaScript: Increment a Number with JavaScript ... I've edited your post for readability. When you enter a code block into a forum...
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