Tell us what’s happening:
Describe your issue in detail here.
I have figured out the correct answer. it is “myVar++”.
But now, I m really confused about that why the following code DO run. “myVar = ++myVar” and “myVar++” are totally different.
plz help me.
Your code so far
let myVar = 87;
// Only change code below this line
myVar = ++myVar ;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 Edg/105.0.1343.33
Challenge: Basic JavaScript - Increment a Number with JavaScript