I have the same question. All my attempts ended with an error "
- The function isIdentical should return true if the objects are identical and false otherwise".
export const isIdentical = (obj1, obj2) => {
var props1 = Object.getOwnPropertyNames(obj1);
var props2 = Object.getOwnPropertyNames(obj2);
if (props1.length != props2.length) {
return false;
} else {
for (const key of props1) {
if (obj1[key] != obj2[key]) {
return false;
}
}
return true;
}
};