Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • yeah, I'm just noticing that too. When I use somethting like document or window i get more luck. Frankly it is a bit unexpected, I don't know why it doesn't work for Math etc. Commented Feb 13, 2010 at 15:33
  • 4
    @Roland: It's because document and window are objects with enumerable properties provided by the browser, they're not part of the scripting runtime. Native objects are and obviously the properties aren't enumerable. Commented Feb 13, 2010 at 15:35
  • 1
    Any E, i don't agree it's obvious. I mean, it is apparent since we can't seem to enumerate them. But I don't see the logic as to why those built-ins should prevent enumeration of their properties. Just curious, is there some part of the standard that says these built-ins should not have enumerable properties? Commented Feb 13, 2010 at 16:04
  • @Roland: sorry, I meant that it's obvious they're not enumerable since they don't show up with a for-in. See my answer below for a quote from the spec. Commented Feb 13, 2010 at 16:22
  • @Mic: Math is a built-in object whose properties aren't enumerable. Commented Feb 13, 2010 at 16:22