Recently, I began studying JavaScript, and I reached a topic about asynchronous coding, or some refer to it as function parameter or callback (node.js to be more specific).
I tested some stuff with it, but can`t get the idea of it. For example
window.addEventListener("click", function(){ alert("HELO"); }, true);
will do nothing. Can somebody explain in short what exactly is the idea behind asynchronous coding and what are these callbacks, also a 3-4 line example will be appreciated.