Skip to content

Instantly share code, notes, and snippets.

@captDaylight
Last active October 5, 2015 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save captDaylight/b7afd279db744a584243 to your computer and use it in GitHub Desktop.
Save captDaylight/b7afd279db744a584243 to your computer and use it in GitHub Desktop.
let arrOne = [1, 2, 3];
let arrTwo = [...arrOne, 4];
console.log(arrOne, arrTwo);
// [1, 2, 3] [1, 2, 3, 4]
let arrThree = [-1, 0, ...arrTwo];
console.log(arrThree);
// [-1, 0, 1, 2, 3, 4]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment