JavaScript check type of object

The instanceof operator is use to check the type of object 


Right way to find type of object is the following

var someObj = new Set;
someObj instanceof Set; // True
someObj instanceof Map; // Flase

Tags:

Share:

Related posts