Skip to content

Instantly share code, notes, and snippets.

@Paul-Browne
Created December 1, 2019 20:54
Show Gist options
  • Save Paul-Browne/757ea3df3d9d5eec0713c7b34b5b3af6 to your computer and use it in GitHub Desktop.
Save Paul-Browne/757ea3df3d9d5eec0713c7b34b5b3af6 to your computer and use it in GitHub Desktop.
var array = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var removedElement = array.pop();
console.log(array);
// [1, 2, 3, 4, 5, 6, 7, 8, 9]
console.log(removedElement);
// 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment