I know the answer is probably really obvious, but I'm having a complete brain fart here.
What I want to do is have a simple form with two buttons. The first button shows a message saying "1". After clicking the second button, the first button says "2" when clicked. After clicking the second button again, it goes back to saying "1".
Having learned programming with javascript, I'm still thinking in javascript. My first train of thought was: myButton.onclick=...
After that the only thing I could think of was to have a conditional inside the first button's click function and use the second button's click to change a boolean...
Is there a better way to do this?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)