23 lines
577 B
Markdown
23 lines
577 B
Markdown
# Chapter 5: JavaScript Objects
|
|
|
|
## Object Basics
|
|
|
|
Create objects:
|
|
```js
|
|
let object_name = {
|
|
property_1_name: property1_value,
|
|
property_2_name: property2_value,
|
|
}
|
|
```
|
|
|
|
To access a single property, using `.` (dot) operator
|
|
|
|
Check code in [object-101.js](../src/objects/objects-101.js)
|
|
|
|
## Using Objects with Functions
|
|
|
|
Parse objects into function just like normal number, it allow us to parse multiple values into function as a single value. Or get multiple values as single value from a function
|
|
|
|
Exmple check [object-function.js](../src/objects/objects-functions.js)
|
|
|