Array methods
Coding with JavaScript
🕑 This lesson will take about 10 minutes
In this lesson, you will learn how to use the following array methods in JavaScript:
push() to append elements to the end of an array
pop() to remove the last element from an array
shift() to remove the first element from an array
unshift() to add an element to the beginning of an array
delete to change an element to undefined in an array
splice() to add or remove elements from an array
concat() to concatenate (join) two or more arrays together
Watch the video below and then scroll down to view the sample code.
Sample HTML and JavaScript code
Next lesson: Finding the length of arrays and strings