// Anonymous function
document.addEventListener('click', function(){
console.log('You clicked me!');
})
The same function with arrow function syntax// Arrow function
document.addEventListener('click', () => {
console.log('You clicked me!');
})
Even more minimalistic arrow function// More minimalistic arrow function
document.addEventListener('click', () => console.log('You clicked me!'))