Skip to content
Advertisement

if something == something show something and keep showing it

so when this is true i want to keep the images even when this turns false later

JavaScript

Advertisement

Answer

I don’t understand why the condition looks like this label=="HowMuchCanYouSee"==true and not just this label=="HowMuchCanYouSee"

Anyway you may add a new flag to the story starting with false that will be turned to true the first time your code it’s hit, and after then, the condition will always pass because there’s flag===true put in OR:

JavaScript

Attention: the flag var is declared global. That’s not a good practice but it shows the concept.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement