.shift()

Description

The shift method takes in an array as input and returns the array with the first item removed

Parameters

Shift takes no parameters

Usage On Arrays

arr = ["wow","hello world"]
// setup the array

log arr.shift()
// ["hello world"]
// returns the array with the first element removed

Last updated