I'm studying Javascript and in one of my quizzes I found this
var foo = function(){};
console.log(foo === foo); // true
console.log(foo === function(){}); // false
console.log(function(){} === function(){});// false
console.log(foo instanceof function(){}); // false
console.log(['a'] == ['a']);// false
Beside foo === function(){}
and foo instanceof function(){}
which are evidently false I can't get why all the other comparisons are also false. For example why ['a'] == ['a']
should be false?
Thank you in advance!