Skip to content

Instantly share code, notes, and snippets.

@phwb
Created May 11, 2017 08:55
Show Gist options
  • Save phwb/3e3065df8e03f2ef581d36563d902335 to your computer and use it in GitHub Desktop.
Save phwb/3e3065df8e03f2ef581d36563d902335 to your computer and use it in GitHub Desktop.
// Immutable.js non-mutating List.push
const collection = Immutable.List.of('ironMan');
const newCollection = collection.push('captainAmerica');
console.log(newCollection)
// Output:
Array [
"ironMan",
"captainAmerica",
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment