5 lines
81 B
JavaScript

var foo = 1;
(function () {
throw new TypeError("\"foo\" is read-only");
})();