forked from extern/naming-cheatsheet
Update README.md
This commit is contained in:
parent
3df5290e3e
commit
a1b30f6cb2
@ -102,13 +102,13 @@ Set something back to its initial value.
|
|||||||
```js
|
```js
|
||||||
const initialFruits = 5;
|
const initialFruits = 5;
|
||||||
const fruits = initialFruits;
|
const fruits = initialFruits;
|
||||||
setFruits(10); // fruits = 10
|
setFruits(10); // fruits === 10
|
||||||
|
|
||||||
function resetFruits() {
|
function resetFruits() {
|
||||||
fruits = initialFruits;
|
fruits = initialFruits;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetFruits(); // fruits = 5
|
resetFruits(); // fruits === 5
|
||||||
```
|
```
|
||||||
#### `compose`
|
#### `compose`
|
||||||
Create new data from the existing one. Probably, applicable mostly to strings.
|
Create new data from the existing one. Probably, applicable mostly to strings.
|
||||||
|
Loading…
Reference in New Issue
Block a user