Javascript does have 'use strict'
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
"use strict";
let undef;
let str1 = "hello";
let str2 = str1 + undef;
console.log(str2); // -> "helloundefined"
Whereas I propose: "use sane";
let undef;
let str1 = "hello";
let str2 = str1 + undef; // -> Uncaught TypeError: Cannot append string and undefined
console.log(str2); // (code never reaches this point)
(I would also settle for "Uncaught ReferenceError: Attempted use of `undef` before initialization.")You might enjoy this classic comedy routine: https://www.destroyallsoftware.com/talks/wat