newt I think that's over-simplifying it though, because it's many layers of "a subset of C" when it comes to HTML5
JavaScript doesn't compile, so it is interpreted at runtime by the browser/JavaScript engine, which probably turns it into bytecode, which then is run by another interpreter at OS level (like .NET) which is running within the operating system made in C and compiled into assembly.
C++/C games skip a lot of those layers (and do have more dangers since you manually clean memory, but if you know what you're doing this is a performance increase over generic garbage collection). C# skips the first few layers that HTML5/JavaScript has, starting from the bytecode level.
Layers/encapsulation is a performance hit (no matter how tiny), this applies in software, network traffic, shipping, and more.
In a (possibly a bit over-) simplified way, this is how C2 and CC games layer: