O'Reilly logo

HTML5 Programming with JavaScript For Dummies by John Paul Mueller

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

Working with Objects

In This Chapter

arrow Specifying the features that define an object in JavaScript

arrow Working with objects

arrow Using object literals

arrow Making objects easier to use by naming them correctly

At one time, programming was entirely about writing procedures. You wrote a procedure to perform a task in a way that the computer could understand. Even if you used a higher level programming language, the process was the same — writing a procedure telling the computer to do something in terms it could understand.

As computer science progressed, it was found that people could relate better to coding scenarios that model the real world rather than the abstract world of the computer. Object Oriented Programming (OOP) is a technique whereby the developer creates a model of a real-world entity and then manipulates that entity with code. The underlying infrastructure translates the model into terms that the computer can understand. Objects are simply models of items you interact with in the real world in some way.

Given that objects are models of real-world entities, you need some method ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required