Removes an element at the given index from the given array.

Type signature

(index: number) => <T>(xs: T[]) => T[]

Examples

removeAt(3)([1, 2, 3, 4, 5, 6]);
// ⇒ [1, 2, 3, 5, 6]
Try in REPL

Questions

  • How to remove an item from an array at a particular index?

TypeScript sourceJavaScript source