how to add event to dive code example
Example: event listener javascript
document.querySelector('div').addEventListener('click', () => {
console.log('div clicked');
});
document.querySelector('div').addEventListener('click', () => {
console.log('div clicked');
});