Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if object

typeof yourVariable === 'object' // true if it's an object or if it's NULL.

// if you want to exclude NULL
typeof yourVariable === 'object' && yourVariable !== null
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #object
ADD COMMENT
Topic
Name
6+9 =