The ECMA-262 5.1 spec expects the Number object to have the properties MAX_VALUE, MIN_VALUE, NAN, POSITIVE_INFINITY and NEGATIVE_INFINITY. Any other property is therefore undefined, so that (Number.Infinity === undefined) evaluates to true.
Yang On Thursday, December 6, 2012 1:41:57 AM UTC+1, chbussler wrote: > > Hi, > > as expected, typeof Infinity is 'number'. However, typeof Number.Infinity > is 'undefined'. Why is that? > > typeof Number.POSITIVE_INFINITY and typeof Number.NEGATIVE_INFINITY are > both 'number', too. So I would expect typeof Number.Infinity to be 'number' > also. > > Thanks. > > -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
