Drop number 1. Both numeric ones leave; the string stays.
Drop string "1". Only the string leaves; numbers stay.
Objects. Two look-alike objects need the same reference to match.
Normalize first if 1 and "1" should be treated the same.
Compatibility
Browser & Runtime Support
_.without ships with Underscore.js (1.x). It runs anywhere Underscore runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install underscore.
✓ Stable · Underscore 1.x
_.without()
Available in [email protected] (UMD / ESM). Works in evergreen browsers and current Node LTS when Underscore is loaded.
100%With Underscore 1.x
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
_.withoutUnderscore 1.x+
Bottom line: Safe for production once Underscore is on the page or in your bundle. Not a native browser API — load Underscore first. Prefer a pinned CDN version (e.g. [email protected]).
Frequently Asked Questions
_.without(array, *values) returns a new array with every instance of the listed values removed, keeping the rest in order.
As many as you need. _.without is variadic — list values after the array, e.g. _.without(arr, 0, 1).
Yes. If a value appears many times, all copies are removed.
With strict equality (===). Objects match by reference, so two look-alike {} values are different.
_.without takes loose values after the array. _.difference takes other arrays. Use without for a short list of literals; difference when exclusions are already in arrays.
No. It returns a new array and leaves the source unchanged.