Hacker News new | ask | show | jobs
by gregjor 846 days ago
There's no such thing as a "C/C++ binary." C and C++ both get compiled into machine code, and we call the result a binary, or executable. Executables, or binaries, contain low-level machine instructions, regardless of the original source language.

Javascript does not get compiled to an executable. It gets interpreted from source, or (more likely) just-in-time compiled into bytecode, which then gets executed by a runtime -- the Javascript interpreter in a browser, or Node.js on a server.

Python, Ruby, PHP, and numerous other languages are called interpreted because they require an interpreter and runtime libraries to execute. C, C++, Pascal, Go, Rust get compiled to executable binaries.

I can't think of any reason Javascript can't get compiled to a binary, or translated to C or C++, but that's not how Javascript generally gets executed and deployed.