Can anyone describe the picture above? It is the screenshot of my Chrome dev-tool console.
1 Answer
Because of JavaScript coercion.
[] is loosely equated to "" and thus coerced to string using [].toString() which is equal to "".
And why does [] == [] and [] === [] return false:
the == and === comparison rules if you’re comparing two non-primitive values, like objects (including function and array). Because those values are actually held by reference, both == and === comparisons will simply check whether the references match, not anything about the underlying values.
var a = [1,2,3];
var b = [1,2,3];
var c = "1,2,3";
a == c; // true
b == c; // true
a == b; // false
arrays are by default coerced to strings by simply joining all the values with commas (,) in between.

[].toString()return?[] == []returns false?doing [] == "", a cast of the array to a string is done by the js interpreter. Then the 2 strings are compared.