varemenos
5/25/2013 - 6:48 AM

JavaScript - Comparison results

JavaScript - Comparison results

var a = '5';
var b = new String('5');

console.log( typeof a, typeof b, a == b, a === b );

/* Output:

> string
> object
> true
> false

*/