Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
const array = [1, 2, 3];
array = [4, 5, 6]; // yes, it works! We can not mutate data but ...
array[0] = 4; // hmmm, now we have an alternative way to mutate data.
console.log(array); // returns [4, 2, 3]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment