Loading ...
Sorry, an error occurred while loading the content.

1397top of inheritance chain

Expand Messages
  • Mark Volkmann
    Jul 29, 2010
    • 0 Attachment
      I'm a little confused about something that is pretty fundamental in
      JavaScript. I was thinking that Object is a prototype of every object.
      That doesn't seem to be the case though. For example, the following
      code prints "false".

      var obj = {};

      So every object has the methods of Object, but there doesn't seem to
      be a reflective way to see how that happens.

      Likewise, I think of all the wrapper classes like Boolean, Number and
      String as "inheriting" from Object, but I can't verify that with code.

      Can someone set me straight?

      R. Mark Volkmann
      Object Computing, Inc.
    • Show all 8 messages in this topic