_.add is a Lodash 4.x Math helper. It runs anywhere Lodash runs — modern browsers (CDN or bundle) and Node.js / Bun / Deno with npm install lodash. Native cousin: the + operator (same float math; different undefined defaults).
✓ Stable · Lodash 4.x
_.add()
Available in [email protected] full builds and the lodash/add modular import. Works in evergreen browsers and current Node LTS when Lodash is installed.
100%With Lodash 4.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
_.addLodash 4.x+
Bottom line: Safe for production once Lodash is loaded. Prefer import add from "lodash/add" for smaller builds. Great as a pairwise adder or reduce callback.
Frequently Asked Questions
It adds augend and addend. Official example: _.add(6, 4) → 10.
If only one is undefined, Lodash returns the other unchanged. If both are undefined, it returns 0 (the additive identity).
When either operand is a string, Lodash concatenates (like native +). Force numbers with _.toNumber first.
No. _.add(0.1, 0.2) is 0.30000000000000004 — same IEEE-754 result as native +.
No. BigInt throws Cannot convert a BigInt value to a number. Use native + for BigInt.
Use _.sum(array) to total many values. Use _.add for two values or as a reducer callback.