The if condition in my javascript code is not working properly
I’m learning javascript and I’m testing out the if condition. I want to display an alert box only if a button has been clicked. But the alert message pops up without the condition being met(the button being clicked).