|
|
@ -3187,7 +3187,7 @@ Destructuring function parameter
|
|
|
|
```js
|
|
|
|
```js
|
|
|
|
const rectangle = { width: 20, height: 10 }
|
|
|
|
const rectangle = { width: 20, height: 10 }
|
|
|
|
const calcualteArea = ({ width, height }) => width * height
|
|
|
|
const calcualteArea = ({ width, height }) => width * height
|
|
|
|
const calculatePerimeter = ({ width, height } = 2 * (width + height))
|
|
|
|
const calculatePerimeter = ({ width, height }) => 2 * (width + height)
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
#### Exercises
|
|
|
|
#### Exercises
|
|
|
|