Murach's JavaScript and DOM Scripting
How to create and use objects

Earlier chapters show how to use native JavaScript object types. Now, this chapter shows you how to create and use your own objects and object types. Along the way, you’ll see how the use of your own objects can help you improve the code within a JavaScript application.

Chapter 11 How to create and use objects
Basic skills for working with objects 356
How to create and use the native object types 356
How to create objects of the Object type 358
How to extend, modify, or delete an object 360
How to create and use your own object types 362
Advanced skills for working with objects 364
How to inherit properties and methods from another object type 364
How to add methods to the JavaScript object types 366
How to create cascading methods 368
How to use the for-in statement with objects 370
How to use the in, instanceof, and typeof operators 372
The Invoice application 374
The user interface 374
The XHTML file 376
The library file 378
The invoice.js file 382




Murach's JavaScript and DOM Scripting

Learn more about this book

View the table of contents


More about the eBook



Our 100% Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a prompt refund...no questions asked.