I am no JavaScript expert, but I found some code like this
a();
function a(){
  alert('a');
}
and I was surprised to find it works (I think something like that will not work in Python). I expected that the function a can't be executed before being created. How does interpreter work and why functions can be called before declaration?
 
     
     
     
    