JS TutorialLesson 18Free preview
JS Objects
This lesson is part of JavaScript · All levels
Summary
An object is a data structure that stores a pair of property values in a single variable, so that the related data can be grouped. The property is accessible via a dot notation (obj.property) or bracket notation (obj['property']), and a property may also contain a function called a method. The object is mutable, meaning that the value in it can be added, changed, or deleted at any time.
Key points
- Object is made with curly braces: const obj = {key: value}
- Dot notation for static names, bracket notation for dynamic or special names
- Method is a function-shaped property called a point sign
- Property that has not yet been generated, not error
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.