How to check if an argument is an object (and not an array) in JavaScript
After testing out instasnceof I found that it will return true if the argument is an array or an object literal. function test(options){ if(options instanceof Object){alert('yes')}//this will alert for both arrays and object literals } test({x:11})// alerts test([11])// alerts as well but I do not want it to Is there a way to test if the argument "options" is an object literal? P.S. I am creating a module that will allow the user to access its configuration options, and I want to test if the argument is only an object literal or not? is there a way to test if the argument "options" is an