Lodash _.add() method is used to add two numbers.
Syntax:
_.add(augend, addend);
Parameters:
- augend: This parameter holds the first number in addition.
- addend: This parameter holds the second number in addition.
Return Value:
This method returns the result of adding two numbers.
Example 1: In this example, we are adding two numbers by the use of the lodash _.add() method.
Javascript
const _ = require( "lodash" );
let gfg = _.add(12, 38);
console.log(gfg)
|
Output:
50
Example 2: In this example, we are adding two numbers by the use of the lodash _.add() method.
Javascript
const _ = require( "lodash" );
let gfg = _.add(248, 723);
console.log(gfg)
|
Output:
971
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!
Last Updated :
27 Oct, 2023
Like Article
Save Article