Js basis, I would like to ask you why console.log reported these three numbers, what is the principle?

var a = {};
var b = {key: "b"};
var c = {key: "c"};
var d = [3,5,6];
a[b] = 123;
a[c] = 345;
a[d] = 333;
console.log(a[b]);  // 345
console.log(a[c]);  // 345
console.log(a[d]);  // 333
Feb.28,2021

  interview  

Menu