DEV Community

Discussion on: Know the type of Variable in JS!

Collapse
 
mrchedda profile image
mr chedda

for isObject I would argue the following function is more robust

function isObject(object){
    return object.constructor === Object
}
Enter fullscreen mode Exit fullscreen mode
Collapse
 
soyleninjs profile image
Lenin Felix

Thanks, i am not see that option, and work very fine <3