4.17.11
3.10.1
2.4.2
1.3.1
_.eq(value, other)
Performs a
SameValueZero
comparison between two values to determine if they are equivalent.
Since
4.0.0
Arguments
argument
value
other
type
*
*
description
The value to compare.
The other value to compare.
Returns
(array)
Example
var object = { a: 1 };
var other = { a: 1 };
_.eq(object, object);
// => true
_.eq(object, other);
// => false
_.eq("a", "a");
// => true
_.eq("a", Object("a"));
// => false
_.eq(NaN, NaN);
// => true
var object = { a: 1 };
var other = { a: 1 };
_.eq(object, object);
// => true
_.eq(object, other);
// => false
_.eq("a", "a");
// => true
_.eq("a", Object("a"));
// => false
_.eq(NaN, NaN);
// => true