Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript code

//The shift() method removes the first array element and "shifts" all other elements to a lower index.

const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.shift();

// The shift() method returns the value that was "shifted out": >> Banana

//if you find this answer is useful ,
//upvote ⇑⇑ , so can the others benefit also . @mohammad alshraideh ( ͡~ ͜ʖ ͡°)
Source by www.guru99.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #code
ADD COMMENT
Topic
Name
8+5 =