Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
development:javascript:mutating_data [2020/02/27 12:43] kalenpw |
development:javascript:mutating_data [2021/06/29 15:04] (current) kalenpw |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Mutating Data ====== | ====== Mutating Data ====== | ||
| + | JavaScript has somewhat annoying rules on this. Deep copies are required if you wish to avoid mutating. | ||
| + | ---- | ||
| + | |||
| <code javascript> | <code javascript> | ||
| const one = [0, 1, 2]; | const one = [0, 1, 2]; | ||
| Line 54: | Line 57: | ||
| [ { name: ' | [ { name: ' | ||
| </ | </ | ||
| + | ---- | ||