UNPKG

wat

Version:

Community-controlled cheat sheets for every coder.

12 lines (8 loc) 184 B
## .shift() Removes the first element from an array and returns it. ```js let arr = [1, 2, 3, 4, 5]; var result = arr.shift(); // result: 1 // arr: [2, 3, 4, 5] ```