check if value is an object
JS ⟩ values ⟩ custom functions ⟩ isObject()
check if value is an object.
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) } // export module.exports = { isObject, isPrimitive };
isPrimitive()
isNumber()
NaN
Object
Last updated 2 years ago