What will be the output of the following code?
function handleClick() {
console.log('Button clicked!');
}
const button = document.getElementById('myButton');
button.addEventListener('click', handleClick);
What will be the output of the following code?
function handleClick() {
console.log('Button clicked!');
}
const button = document.getElementById('myButton');
button.addEventListener('click', handleClick);