Method .shift()
let cats = ['Bob', 'Willy', 'Mini'];
cats.shift(); // ['Willy', 'Mini']
Remove an item from the beginning and returns the removed item.
Comments
let cats = ['Bob', 'Willy', 'Mini'];
cats.shift(); // ['Willy', 'Mini']
Remove an item from the beginning and returns the removed item.