Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a4906bc

Browse files
author
MBU2
committed
Wrong glossary sample on mutable notion
1 parent a734544 commit a4906bc

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

modern-js-cheatsheet-EN.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,11 +1133,10 @@ Source: [MDN](https://developer.mozilla.org/en-US/docs/Glossary/Scope)
11331133
A variable is said to have been mutated when its initial value has changed afterwards.
11341134

11351135
```js
1136-
var myVar = "Nick";
1137-
myVar = "John" // here myVar is being mutated
1138-
11391136
var myArray = [];
11401137
myArray.push("firstEl") // myArray is being mutated
11411138
```
11421139

1143-
A variable is said to be *immutable* if it can't be mutated.
1140+
A variable is said to be *immutable* if it can't be mutated.
1141+
1142+
[Check MDN Mutable article](https://developer.mozilla.org/en-US/docs/Glossary/Mutable) for more details.

readme.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,11 +1133,10 @@ Source: [MDN](https://developer.mozilla.org/en-US/docs/Glossary/Scope)
11331133
A variable is said to have been mutated when its initial value has changed afterwards.
11341134

11351135
```js
1136-
var myVar = "Nick";
1137-
myVar = "John" // here myVar is being mutated
1138-
11391136
var myArray = [];
11401137
myArray.push("firstEl") // myArray is being mutated
11411138
```
11421139

1143-
A variable is said to be *immutable* if it can't be mutated.
1140+
A variable is said to be *immutable* if it can't be mutated.
1141+
1142+
[Check MDN Mutable article](https://developer.mozilla.org/en-US/docs/Glossary/Mutable) for more details.

0 commit comments

Comments
 (0)