Given two objects, with a maximum of two key-value pairs, perform a shallow and quick comparison and return a boolean. Return true if they have the same keys and values. Otherwise false.
Sample Code:
function compObj(obj1,obj2) {
// Enter your logic here...
}
Examples:
Input: {lang:'Javascript'},{lang:'Javascript'}
Output: true
Explanation: Both objects are equivalent to each other, in terms of property and value.
Input: {'meow':'woof','woof':'meow'},{'woof':'meow','meow':'woof'}
Output: false
Explanation: Because of different order.