Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block-Scoped Constants ES5 code is wrong. #17

Closed
webbedspace opened this issue Apr 8, 2015 · 1 comment
Closed

Block-Scoped Constants ES5 code is wrong. #17

webbedspace opened this issue Apr 8, 2015 · 1 comment

Comments

@webbedspace
Copy link

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.

@rse rse closed this as completed in c85e96d Apr 8, 2015
@rse
Copy link
Owner

rse commented Apr 8, 2015

I've tried a rough ES5 equivalent again: this time with defineProperty. Thanks for the hint.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants