Can you make a button in javascript do different things depending on how many times you press it?

javascript

#1

Can you make a button in javascript do different things depending on how many times you press it?


#2

No, we can't. We can however make a counter, and then if a button isn't pressed for a while (you need a timer), and then base a action on how many times the button is pressed