+ 2
How to call a function whenever the two buttons are clicked?
How to call a function whenever the two buttons are clicked? I have a short code where the two boolean initializations are false. And whenever the first button is click, it sets the boolean to true. And after that if the second button is click, it sets the another boolean to true. If the two booleans are both set to true (or if the two buttons are clicked), it should call a function. The example is in the code. 🥺🥺 I failed my attempt. https://code.sololearn.com/W3yrwZxH7A0o/?ref=app
2 Antworten
+ 7
All u have to do is ...
Add a function called check and inside this write those if & else statement
And call check function on both click event
Here is the correct code
https://code.sololearn.com/WHK3ffV9Ejo4/?ref=app
+ 1
Thank you so much. That helps me a lot.