Looks like you forgot to call areEqual
and areSame
with both parameters:
console.log(areEqual(productdisplay, productdisplay1));
console.log(areSame(productdisplay, productdisplay1));
And please create a new post for distinct questions like this. Thanks!