Mats Haby

Mats Haby

Array methods: pop( ) and shift( )

Jan 13, 20211 min read 53 views

Array pop With the Array method pop(), you can remove the last element from an array and it returns the removed element. pop() changes the length of the array.If you call pop() in on an empty array, it will return undefined. Array shift shift() Is...

Array methods: pop( ) and shift( )
#100DaysOfCode
Rubber duck debugging
Welcome and JS - What is an Array and how to add elements to an array