Block-Scoped Constants ES5 code is wrong.
webbedspace opened this issue · comments
Leon commented
This is not comparable to const
: you can still re-bind the PI
variable to something else, e.g. PI = 7;
. Really, ES5 has no equivalent.
Dr. Ralf S. Engelschall commented
I've tried a rough ES5 equivalent again: this time with defineProperty. Thanks for the hint.