![New JavaScript learner here: why must the if statement be inside the onclick function for the alert to appear? : r/learnjavascript New JavaScript learner here: why must the if statement be inside the onclick function for the alert to appear? : r/learnjavascript](https://preview.redd.it/plhyxl12syt71.jpg?auto=webp&s=a058b8e4569cca43f4bc91be0a5bf15d18ac81c6)
New JavaScript learner here: why must the if statement be inside the onclick function for the alert to appear? : r/learnjavascript
![Stepping out into an HTML 'onclick' attribute shows the HTML file with an unexpected highlight · Issue #7293 · firefox-devtools/debugger · GitHub Stepping out into an HTML 'onclick' attribute shows the HTML file with an unexpected highlight · Issue #7293 · firefox-devtools/debugger · GitHub](https://user-images.githubusercontent.com/132260/48644712-567af680-e998-11e8-85e5-b4ef74385eef.png)
Stepping out into an HTML 'onclick' attribute shows the HTML file with an unexpected highlight · Issue #7293 · firefox-devtools/debugger · GitHub
![Call Javascript Function On HTML Button Click, Call Javascript Function On Button Click, Trigger Javascript Function Call Javascript Function On HTML Button Click, Call Javascript Function On Button Click, Trigger Javascript Function](https://www.technomark.in/img/Call%20Javascript%20Function%20On%20HTML%20Button%20Click%202.png)