Why does this skip my first question to go on to [2] and [3] | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Why does this skip my first question to go on to [2] and [3]

Tried many ways cant get it to implement question [1]. About to say screw it and skip it myself! https://code.sololearn.com/WbIL76iAT8mT/?ref=app

6th May 2019, 4:07 AM
Cyrus The Virus!
Cyrus The Virus! - avatar
3 Answers
+ 5
It doesnt skip for me either. If I change the if statements to start with y==1, the text changes to Text 1 on the first click on true. And you also could change the html, so that you dont delete the buttons on click, maybe like this: <div><p id="text">...text to change...</p><button id="buttonT">True</button><button...>False</button></div> Then you would need to change the position of the buttons too.
6th May 2019, 10:21 AM
Lena
+ 3
i don't get what you mean. i see question 1 appears after two clicks on true now. so your problem solved? add console.log(y) to keep track of the value of your y.
6th May 2019, 4:47 AM
Gordon
Gordon - avatar
0
Removed it and still skips
6th May 2019, 4:28 AM
Cyrus The Virus!
Cyrus The Virus! - avatar