logo
logo

Listen for Click

Listen for Click

Write a function called
listenForClick
that adds a click event listener to a given element and logs "Button was clicked!" to the console when the button is clicked.
Console
Submit
Solution
00:00