Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check javascript object not array and not null

In javascript an array is also an object, 
so most of the time you want to exclude the array: 

function isObjectExcludeArray(obj){
	return (obj === Object(obj) && Object.prototype.toString.call(obj) !== '[object Array]');
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #javascript #object #array #null
ADD COMMENT
Topic
Name
6+2 =