Skip to content

Instantly share code, notes, and snippets.

@seandaniel
Last active July 31, 2020 14:04
Show Gist options
  • Save seandaniel/683926b0af857e2d3108fd80f135979d to your computer and use it in GitHub Desktop.
Save seandaniel/683926b0af857e2d3108fd80f135979d to your computer and use it in GitHub Desktop.
How to use the push() method
const groceries = ['bananas', 'milk', 'chicken', 'avocados'];
groceries.push('cookies');
console.log(groceries);
// ['bananas', 'milk', 'chicken', 'avocados', 'cookies']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment