💾isObject()
check if value is an object
Last updated
Was this helpful?
check if value is an object
Last updated
Was this helpful?
Was this helpful?
JS ⟩ values ⟩ custom functions ⟩ isObject()
replit:isPrimitive()
// ⭐ check if value is object
function isObject(value) {
return value === Object(value)
}
// ⭐ check if value is primitive
function isPrimitive(value) {
return !isObject(value)
}