Start with writing a custom cpu emulator -> machine code -> assembler -> compiler
Sounds hard but it's quite easy with stack architecture :) Easier than learning JS for sure