Well for dynamic languages like JavaScript, JIT is the only reasonable option.
You can AOT compile them, but the code cannot ever be optiomal without any kind of PGO feedback loop, thus a JIT ends up being a much better option.
Unless they support optional types, like in the Lisp based languages.
So something like Typescript could eventually have a good AOT story, and this is what Microsoft does on their MakeCode project, compiling a Typescript subset via C++ code generation.