first input value
second input value
boolean indicating whether two arguments are the same value
var bool = isSameValueZero( true, true );
// returns true
var bool = isSameValueZero( 3.14, 3.14 );
// returns true
var bool = isSameValueZero( {}, {} );
// returns false
var bool = isSameValueZero( -0.0, -0.0 );
// returns true
var bool = isSameValueZero( -0.0, 0.0 );
// returns true
var bool = isSameValueZero( NaN, NaN );
// returns true
var bool = isSameValueZero( [], [] );
// returns false
Tests if two arguments are the same value.
Notes
===
operator in that the function treatsNaNs
as the same.