Does includes method consider references too.
Eg:
let temp1 = [{a:5,b:3},{a:10,b:10}]
temp1.includes(temp1[0])
//returns true
let obj = {...temp1[0]}
temp1.includes(obj)
//returns false
Can someone please explain how includes method is working in this context
obj === temp1[0] // falsetemp1contains an object, this object comes fromtemp1so it's true. It's not comparing values or keys.