How can 2 objects be added through a js function without using 'join' that the result output below is true? This is the code that I have now:
var twoObjs = function(obj1, obj2) {
return obj1 + obj2; // does not work
};
twoObjs("dog", "ball");
var output = mergeObjs({dog: "Max"}, {toy: "mouse"});
console.log(output.cat === "Max")
console.log(output.toy === "mouse")