Why when comparing two identical arrays outputs false?

For example:
var arr1 = [1,2,3];
var arr2 = [1,2,3];

console.log( arr1 == arr2 ); //Prints false

Just started to learn js for this moment.
September 19th 19 at 13:22
2 answers
September 19th 19 at 13:24
You are comparing references to the array objects, but they are different.

Compare for example:
var a = "123"; 
var b = "123"; 
console.log(a == b);
var c = new String("123"); 
var d = new String("123"); 
console.log(c == d);
Now everything is clear, thank you) - gerda.OReill commented on September 19th 19 at 13:27
September 19th 19 at 13:26
Briefly - because it is - objects, and they, in General, are never equal.
Objects compare differently, for example:

Or, for example, override Array.prototype.equals
Thank you) - gerda.OReill commented on September 19th 19 at 13:29

Find more questions by tags JavaScriptArrays