Course Content
Javascript Full Course
0/87
JavaScript Course
About Lesson
Shift Array:

The shift() method removes the first element of the array thus reducing the size of the original array by 1.

Example: 

  var x = [“Ram”, “Arman”, “Raghav”, “Manav”];

   x.shift();

Unshift Array:

The unshift() method is used to add one or more elements to the beginning of the given array. This function increases the length of the existing array by the number of elements added to the array.

Example: 

  var x = [“Ram”, “Arman”, “Raghav”, “Manav”];

   x.unshift();

Exercise Files
No Attachment Found
No Attachment Found
Join the conversation

Introducing Official ApeStaking Protocol for ApeCoin.

New Blur NFT Marketplace Courting Professional.