If I have two separate objects in Javascript:
test_object_1 = {name: "tom", age: 22, occupation: "bus driver", favorite_color: "blue"};
test_object_2 = {name: "howard", age: 22, favorite_color: "blue", occupation: "dog walker"};
How would I go about comparing seeing if there was two matching key, value pairs. I would prefer if it was multiple functions, I am trying to do it in the most understandable way possible. (I would prefer not to use .hasOwnProperty because I do not yet understand it, if used please explain its use explicitly)
It should return true
for both age
and favorite_color
.