register click handler javascript for code example
Example: event listener javascript
document.querySelector('div').addEventListener('click', () => {
console.log('div clicked');
});
document.querySelector('div').addEventListener('click', () => {
console.log('div clicked');
});