What are the reasons for the emergence of the two results? JS reference type result

what is the reason for the emergence of the two results?

var arrs = [{ x: 1 }];
console.log(arrs); // [{ x: 2 }]
arrs[0].x = 2;
console.log(arrs);// [{ x: 2 }]
 console.log(arrs)
 [{x: 2}]


var arrs2 = [{ x: 1 }];
console.log(arrs2[0].x); // 1
arrs2[0].x = 2;
console.log(arrs2[0].x);// 2
Mar.04,2022

I'll show you something funny, and you'll know why

  

what the general browser console.log prints out is also a reference to the data, not a snapshot of the facts

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b24d-2afb2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b24d-2afb2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?