Just surprised how many upvotes for wrong answers 😮
<br> Only [1 answer](https://stackoverflow.com/a/16608074/3612353) passed my tests!!! Here I've created my simplified version:
function isObject(o) {
return o instanceof Object && o.constructor === Object;
}
As for me, it's clear and simple, and just works! Here my tests:
console.log(isObject({})); // Will return: true
console.log(isObject([])); // Will return: false
console.log(isObject(null)); // Will return: false
console.log(isObject(/.*/)); // Will return: false
ONE MORE TIME: not all answers pass this tests !!! 🙈