Phew! That’s a feat.
Linux in x86 machine code –> x86 interpreter written in Javascript –> Javascript interpreter (with JIT?) in x86 machine code
JavaScript- Now powerful enough to run Linux – Deep Tech – CNET News
This specific example doesn’t make much sense for practical use, but shows that processor and VM emulation is feasible in Javascript, at least for simpler tasks, e.g. for playing old console games.