Skip to Content
JavaScript® 24-Hour Trainer
book

JavaScript® 24-Hour Trainer

by Jeremy McPeak
December 2010
Beginner content levelBeginner
455 pages
9h 37m
English
Wrox
Content preview from JavaScript® 24-Hour Trainer

Chapter 7. Objects and Built-In Types

You live in an object-based world. Stop and think about the objects you come in contact with pretty much every second of every day. Whether you're driving to work or school, sitting at a table eating dinner, sleeping in a bed, or even walking in a field — you're interacting with objects. You don't even think about most of the objects you come in contact with every day. Interaction with objects is natural to you.

Before the 1990s, programmers primarily used procedural programming languages. These languages were based on the steps a program takes to reach the desired goal — very much like the examples thus far in this book. It wasn't until the 1990s that mainstream developers began to shift their thinking to involve objects.

Objects are a very important part of JavaScript: In fact, just about everything in JavaScript is an object. An understanding of what objects are and how to use them is required in order to use the language to its full potential. First let's talk a little more about what objects are and why they're useful.

WHAT ARE OBJECTS?

It's easiest to understand objects in a programming context by comparing them with real-world examples. Consider an automobile as an example. Automobiles come in a variety of colors, and are made by manufacturers that build them into different models. Some have vinyl interiors, while others have leather. Most automobiles come with an automatic transmission, and a small number of them have manual transmissions. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JavaScript® 24-Hour Trainer

JavaScript® 24-Hour Trainer

Jeremy McPeak
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally

Publisher Resources

ISBN: 9780470647837Purchase book