A language like C or C++ is very portable, it runs on just about every single architecture (different microcontrollers, operating systems, etc.).
It provides near complete control of the processor and its features and can be optimized for speed or size at the expense of being extremely verbose and environment-aware.
Something like JavaScript, runs in fewer environments and you’re often at the mercy of the browser or other environment hosting the javascript environment, but it’s very well suited to manipulating elements on a web page and making HTTP requests.
Latest Answers