- 5
What is person ?
person is object or not
1 ответ
+ 7
Context for Q&A...In Q&A it isn't always clear these questions are from Lessons.
Context at the Lesson*:
--------------------
[Objects are like]... a list of values that are written as name:value pairs, with the names and the values separated by colons.
var person = {
name : "John", age : 31, ...
}
--------------------
Here, the var and { } tell you you're working with an object (named 'person'), as opposed to something else, like a function. The key:value pairs are just "variables" the object wraps.
* Javascript | Objects (Section 5) | Introducing Objects (Panel 1) | first code sample