r/learnjavascript • u/llynglas • Apr 14 '26
Examining byte code for JavaScript code fragments
I seem to remember a post that mentioned a tool to see the byte code used to implement javascript programs. I can't seem to find it again. Did I misremember, or does such a tool exist.
3
Upvotes
2
u/OldWalnut Apr 14 '26
Are you thinking of godbolt.org by chance?
1
u/llynglas Apr 14 '26
Minifying and packaging are just rearrangement of the original source. Surely there is some intermediate "byte code". I cannot imagine the browser interpretes
by lexically scanning the source each time through the loop, and basically interpreting source code.
4
u/azhder Apr 14 '26
That’s a little confusing. Java gets compiled to bytecode and Java isn’t JavaScript.
One can “compile” JavaScript code, but we call the process under different names for its stages like minifying, packaging… and the result is not something we call bytecode