On various stages of the curriculum, correct code wasn’t validated despite my tests showing that the code should have worked. After some troubleshooting, the problem turned out to be a browser extension/add-on/plugin/etc. called Saka Key.
Workaround: Use the on/off toggle switch in Saka Key’s quick-menu to disable the shortcut before code is evaluated.