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

window.Math #768

Closed
yukulele opened this issue Jan 30, 2017 · 4 comments

Comments

@yukulele
Copy link

commented Jan 30, 2017

Always prefix browser globals with window..
Exceptions are: document, console and navigator.

eslint: no-undef

also for Math?

@dcousens

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

Math is a global on its own, also found as window.Math in browsers for whatever reason

@dcousens dcousens added the question label Jan 30, 2017

@yukulele

This comment has been minimized.

Copy link
Author

commented Jan 30, 2017

Not sure to understand...
So I can use Math directly because it's not a "browser global" but "global on its own"?

@dcousens

This comment has been minimized.

Copy link
Member

commented Jan 30, 2017

Yes 👍

@dcousens dcousens closed this Jan 30, 2017

@feross

This comment has been minimized.

Copy link
Member

commented Jan 31, 2017

@yukulele That's right. Math is part of the JavaScript language itself, not just something that the browser or Node.js adds into the global context.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
3 participants
You can’t perform that action at this time.