Lodash _.isEqual() Method Last Updated : 09 Jan, 2025 Comments Improve Suggest changes Like Article Like Report Lodash _.isEqual() Method performs a deep comparison between two values to determine if they are equivalent. This method supports comparing arrays, array buffers, boolean, date objects, maps, numbers, objects, regex, sets, strings, symbols, and typed arrays. Syntax:_.isEqual( value1, value2);Parameters:value1: First comparable valuevalue2: Second comparable valueReturn Value: This method returns a Boolean value(Returns true if the two values are equal, else false).Note: Objects are compared directly, their inherited or enumerable properties are not compared. Functions and DOM nodes are compared strictly by the '===' operator.Example 1: In this example, We are comparing two variables having objects as a value and printing results in the console. JavaScript // Defining Lodash variable const _ = require('lodash'); // First value let val1 = { "a": "gfg" }; // Second value let val2 = { "b": "gfg" }; // Checking for Equal Value console.log("The Values are Equal : " + _.isEqual(val1, val2)); Output:The Values are Equal : falseExample 2: In this example, We are comparing two variables having Array as a value and printing results in the console. JavaScript // Defining Lodash variable const _ = require('lodash'); let val1 = [1, 2, 3, 4] let val2 = [1, 2, 3, 4] // Checking for Equal Value console.log("The Values are Equal : " + _.isEqual(val1, val2)); Output:The Values are Equal : trueExample 3: In this example, We are comparing two variables having String as a value and printing results in the console. JavaScript // Defining Lodash variable const _ = require('lodash'); let val1 = "gfg" let val2 = "gfg" // Checking for Equal Value console.log("The Values are Equal : " +_.isEqual(val1,val2)); Output:The Values are Equal : trueExample 4: In this example, We are comparing two variables having Numbers as a value and printing results in the console. JavaScript // Defining Lodash variable const _ = require('lodash'); let val1 = 1 let val2 = 1 // Checking for Equal Value console.log("The Values are Equal : " + _.isEqual(val1, val2)); Output:The Values are Equal : true Comment More infoAdvertise with us T taran910 Follow Improve Article Tags : JavaScript Web Technologies JavaScript-Lodash Similar Reads Lodash _.castArray() Method Lodash _.castArray() method is used to cast value into an array if it is not an array.Syntax: _.castArray(value);Parameters:  value: This parameter holds the value that needs to be inspected.Return Value:It returns an array with the including value passed in the _.castArray().Example 1: In this exam 2 min read Lodash _.clone() Method Lodash _.clone() method is used to create a shallow copy of the value. This method supports cloning arrays, array buffers, booleans, date objects, maps, numbers, Object objects, regexes, sets, strings, symbols, and typed arrays. It is loosely based on the structured clone algorithm. Syntax:_.clone(v 2 min read Lodash _.cloneDeep() Method The Lodash _.cloneDeep() method is handy for making a complete copy of a value. It goes deep into the value, copying everything inside it too. So, the new object you get has the exact same data as the original, but they're not linked in memory.This method is similar to the _.clone() method.Syntax: _ 2 min read Lodash _.cloneDeepWith() Method Lodash .cloneDeepWith() method is used to clone value in a recursive way, just the same as the  _.cloneWith() method but performs in a recursive manner.Syntax:_.cloneDeepWith( value, [customizer]);Parameters: value: This parameter holds the value which will be cloned in a recursive way.customizer: T 2 min read Lodash _.cloneWith() Method Lodash _.cloneWith() method of Lang in lodash is similar to the _.clone() method and the only difference is that it accepts a customizer which is called in order to generate cloned value. Moreover, if the customizer used here returns undefined then the cloning is dealt with by the method instead.Not 2 min read Lodash _.conformsTo() Method Lodash _.conformsTo() method is used to check if the given object conforms to the given source by invoking the predicate properties of the source with the corresponding property values of the object. It returns true if it conforms, else false.Syntax:_.conformsTo( object, source );Parameters: object: 2 min read Lodash _.eq() Method Lodash _.eq() method is used to find whether the two values are equivalent or not by performing the SameValueZero comparison. It returns true if the values are equivalent. Otherwise, it returns false.Syntax:_.eq(value, other);Parameters: value: This parameter holds the value to compare.other: This p 2 min read Lodash _.gt() Method Lodash _.gt() method is used to find whether the value is greater than others or not. It returns true if the value is greater than the other value. Otherwise, it returns false.Syntax:_.gt(value, other);Parameters: value: This parameter holds the value to compare.other: This parameter holds the other 2 min read Lodash _.gte() Method Lodash _.gte() method is used to check whether the specified value is greater than or equal to another or not.Syntax:_.gte(value, other);Parameters: value: This parameter holds the first value to compare.other: This parameter holds the second value to compare.Return Value: This method returns a bool 2 min read Lodash _.isArguments() Method Lodash _.isArguments() method checks if the value is likely an arguments object. Syntax:_.isArguments(value);Parameters: value: It is the function that is used to check the value.Return Value: This method returns true if the value is an argument object else false. Example 1: In this example, we are 2 min read Like