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

Object property name ... strangeness #221

Closed
mstoykov opened this issue Oct 21, 2020 · 0 comments
Closed

Object property name ... strangeness #221

mstoykov opened this issue Oct 21, 2020 · 0 comments
Labels

Comments

@mstoykov
Copy link
Contributor

If you have the code

var s = {1e3: 10} 
s[1000] // undefined
s[1e3] // undefined
s["1e3"] // 10 

But this works perfectly fine if it's s[1e3] = 10

This seems to work in firefox and as this grafana/k6#1126 issues shows is used by minifiers, but I don't know if this isn't ES6+ 🤷‍♂️

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

No branches or pull requests

2 participants