Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 193 Bytes

javascript-immutable-state-changes.md

File metadata and controls

11 lines (8 loc) · 193 Bytes

Immutable State Changes

Arrays

Add item

let characters = ['Jeffrey', 'Donny', 'Walter'];
const newCharacter = 'Maude';
characters = [...characters, newCharacter];