Using objects
Overview
In this lesson we will consider how to use objects in JavaScript. We will learn how to create objects in a later lesson.
If you are already comfortable with the programming concepts of objects and trees, please proceed to the next step.
In-depth background from our introductory programming course
Brief review of programming concepts: objects
An object is a way of grouping information to form a data typeA type of data, such as a number or a string.. Objects may have both properties (values associated with the objects) and methods (functions associated with the objects). Properties are sometimes called attributes, but we will not use that term here to avoid the risk of confusing it with the use of the same term in HTML. Each time we use the term property, we will make it clear whether we are referring to the property of an object or to a CSS propertyAn aspect of an element that can be styled..
For now, we will focus on built-in objects. For each built-in object, we will consider what properties and methods are available, and give the syntaxThe rules for expression. for extracting a property or applying a method.
Brief review of programming concepts: trees
If you are unfamiliar with trees, you can review the Web basics lesson we have provided on the topic.