I have been writing javascript for quite a long time, but so far some features of the language are not clear to me. There is an example code. The body of the function is passed to it. Please explain with the example of your code how to make it so that you can pass the body of the function to the argument and how you can call it later. I cannot understand this moment for quite a long time. Thank!
var body = document.getElementsByTagName('body')[0]; body.addEventListener('click', function() { alert('body'); });