Introducing Objects part 1

Introducing Objects
5
1/3













JavaScript Objects
JavaScript variables are containers for data values. Objects are variables too, but they can contain many values.
Think of an object as a list of values that are written as name:value pairs, with the names and the values separated by colons.
Example:var person = {
name: "John", age: 31,
favColor: "green", height: 183
};
These values are called properties.
JavaScript objects are containers for named values.
Comments
Post a Comment