Most JavaScript usage is just-in-time compiled.
As code runs, types of values are watched and when a function runs frequently enough, a faster specialized version of that function is compiled on-demand.
Ahead of time compilation bakes that work into the executable itself.