Skip to content

Instantly share code, notes, and snippets.

@phwb
Last active May 11, 2017 08:57
Show Gist options
  • Save phwb/30d6ee910fa03b0a578e145816229e5d to your computer and use it in GitHub Desktop.
Save phwb/30d6ee910fa03b0a578e145816229e5d to your computer and use it in GitHub Desktop.
// Standard mutating JavaScript Array push
const collection = ['ironMan'];
collection.push('captainAmerica');
console.log(collection)
// Output:
Array [
"ironMan",
"captainAmerica",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment