JavaScript concept with a cup of coffee and a laptop

Array Methods & Properties


Push is an array method that allows us to add items to the end of the array. For example, perhaps we wish to add Uecker to the array. We can utilize push as follows…

baseballCards.push( ‘Uecker’ );
console.log( baseballCards );

The output to the console will be ‘Aaron’, ‘Ruth’, ‘Wagner’, ‘Uecker’.

Happy Coding!

Clay Hess

Share this post

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on pinterest
Share on print
Share on email
Skip to content