Skip to content

Glossary: Data Structures and Algorithms in JavaScript

Shifting

Also written: shift, unshift, splice

Moving items along an array to open or close a gap, which costs O(n). It is why unshift, shift and splice are slow on big arrays.

Where the book teaches it

Related terms

ArrayDynamic array