Lodash _.drop() method

Beginner
⏱️ 6 min read
📚 Updated: May 2026
🎯 3 Code examples
🚀 3 Try-it labs
Lodash

What you’ll learn

  • How _.drop(array, n) returns a new array skipping the first n entries.
  • Defaults for n, plus edge cases for 0, empty arrays, and n beyond the length.
  • How drop compares to slice, tail, and dropRight in the Lodash toolbox.
  • Try each example in the editor (?tryit=1, 2, 3) with Lodash from a CDN.

Prerequisites

Arrays and zero-based indexing; optional prior read _.differenceWith() on this site.

  • You know that array.slice(1) in native JavaScript returns a new array without mutating the source.
  • You can run snippets in Node or open the Try-it labs in a browser.

Overview

_.drop answers “give me the rest of the list after skipping the first n items.” It is a small, readable helper over slice(n) with Lodash’s usual coercion rules and a default of n = 1 when you only pass the array.

Non-destructive

The source array stays the same; you always work with a new result array.

Skip headers

Useful after parsing CSV rows, log lines, or token lists where the first cells are metadata.

Pairs with tail

_.tail is the fixed “drop one” spelling; drop adds a configurable count.

Syntax

javascript
_.drop(array, [n=1])
  • array: source collection (array-like values are coerced).
  • n: non-negative integer count of elements to remove from the start; defaults to 1 when omitted.
  • Returns: a new array of the remaining elements in original order.
1

Default: drop one

With only the array argument, Lodash removes the first element and returns the tail.

javascript
import drop from "lodash/drop";

drop([1, 2, 3]);
// [2, 3]
Try it Yourself
2

Drop a specific count

Pass n to skip multiple leading values in one call.

javascript
import drop from "lodash/drop";

drop([1, 2, 3], 2);
// [3]
Try it Yourself
3

Zero and “drop everything”

n = 0 keeps the whole sequence (new array). If n is not smaller than the length, the result is empty.

javascript
import drop from "lodash/drop";

drop([1, 2, 3], 0);
// [1, 2, 3]

drop([1, 2, 3], 5);
// []
Try it Yourself

📋 _.drop vs slice vs tail

APIWhat it doesNote
_.drop(arr, n)New array without first n itemsDefault n is 1; reads well in pipelines
arr.slice(n)Native slice from index n to the endSame shape for non-mutating skips; no Lodash coercion helpers
_.tail(arr)Drop exactly one elementEquivalent to _.drop(arr) for ordinary arrays

Pitfalls to avoid

Sharing

Shallow copy only

Elements are not cloned; objects inside the dropped region still exist in the original array if you keep a reference to it.

End

Trimming from the right

drop only removes from the start. For suffix removal use _.dropRight or slice with a negative end index.

Mutate

Need in-place shift

splice, shift, or queue structures mutate the source. drop is for pure pipelines that prefer immutability.

❓ FAQ

No. Lodash returns a new array (a slice of the data); the source array is unchanged.
When n is undefined or omitted, Lodash drops one element from the beginning, matching the common tail/skip-head use case.
You get an empty array. Nothing throws; the result is simply [].
Lodash normalizes n to a non-negative integer, so 0 means drop nothing: you receive a new array containing every element (shallow copy semantics like slice).
Use import drop from "lodash/drop" or require("lodash/drop") for tree-shaking friendly bundles.

Summary

Did you know?

Omitting n (or using Lodash’s guarded arity so the second argument is treated as absent) makes Lodash drop one element, the same effect as _.tail on a non-empty array.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

6 people found this page helpful