-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
typeof null is object, not 'null' #1933
Comments
If |
Seems odd that jQuery makes up its own types, but ok. |
It's not "odd" because jQuery isn't making up it's own types: http://es5.github.io/#x8.2
|
Ok, I kind of knew this, but Rick just blew my mind. |
I just realized that I shouldn't have used |
@rwaldron That's pretty interesting! Out of curiosity, if this was a bug, I would have thought that there would be an ( accidentally ) unused definition for |
I think it was the logical connection of Sometimes bugs, right? |
This seems odd to me. jQuery thinks
null
references are type"null"
(string null). But javascript'stypeof
thinksnull
references are type object.Why does jQuery treat
null
as its own type? Treating it's "type" as an object is useful in certain cases, and since that is what the language does, this seems odd.The text was updated successfully, but these errors were encountered: