Presumably that's not true for any code that uses modern keywords such as class or super or await as variable names.
I can't recall as I don't do Javascript development regularly, but doesn't that require `"use strict"`?
It is, actually. Well, "class" and "super" were never legal even before they became keywords, because the language was designed to evolve and those were obvious things which might be useful later. But "await" still works as a variable name outside of an async function, even today, precisely so that old code still works as it used to. There are some contortions in the specification (and implementations) required to make this work, but it does work. (I am one of the current editors of the JS specification.)