You are right. What is the magic formula to make the JIT so fast?
Javascript has some features that makes it hard to be JITed.
For example it has no fixed object layout.
If you are interested into how language design impacts performance this is worth reading:
http://wren.io/performance.html