• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 23. Cookies and Creating Your Ow... > The JavaScript Object Object

The JavaScript Object Object

Here’s another way to create custom objects, as of Netscape Navigator 3 and Internet Explorer 4: You can base them on the JavaScript Object object explicitly. In fact, all JavaScript objects are based on the Object object now, and that means any object you create with the new operator.

For example, here’s how I create a new object, object1, and add a property to it, value, and then store a number in that property and display the stored value:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint