What will happen when the following code is executed?
const button = document.getElementById('myButton');
button.addEventListener('click', () => {
console.log('Button clicked!');
});
What will happen when the following code is executed?
const button = document.getElementById('myButton');
button.addEventListener('click', () => {
console.log('Button clicked!');
});