first input value
second input value
boolean indicating whether two arguments have the same type
var bool = isSameType( true, true );
// returns true
var bool = isSameType( 3.14, 3.14 );
// returns true
var bool = isSameType( {}, [] );
// returns true
var bool = isSameType( NaN, NaN );
// returns true
var bool = isSameType( 0.0, '0.0' );
// returns false
Tests if two arguments have the same type.
Notes
typeof
operator to test for the same type.