Skip to content

Glossary: Software Design Patterns in JavaScript

splice

Also written: indexOf

An array method that removes (and can insert) items at a given position. Paired with `indexOf`, it removes one specific item, as in undoing an added cart item or removing a listener.

Where the book teaches it

Related terms

Command