Why does the Bool value not changing for the parent function? | Sololearn: Learn to code for FREE!

0

Why does the Bool value not changing for the parent function?

https://code.sololearn.com/WbQuaAPaF2rf/#js

8/12/2020 12:35:07 PM

zexu knub

3 Answers

New Answer

+4

Whenever you click on button state is assigned false again

+3

It is changing.. You are outputting it before setting it to true. And as Abhay said, if you click it again.. It is set to false again.. https://code.sololearn.com/WF9BISf866Xs/?ref=app

0

Yeah didn't consider that... thanks