JS: Determine Type of Object
How to find out if a object is function, array, date, regex, etc?
Check If Object is Array
Check If Object is Function
typeof obj === "function"
(also works on Arrow Function)
Other
The most reliable and generic way to determine the type of object is this:
Reflect.apply( Object.prototype.toString , val, [] )
For detail, see Object.prototype.toString
JavaScript, Value Types
JavaScript, Object and Inheritance
- JS: Object Tutorial
- JS: Object Overview
- JS: Object Type
- JS: Test is Object Type 💠
- JS: Determine Type of Object
- JS: Prototype and Inheritance
- JS: Prototype Chain
- JS: Object.prototype.isPrototypeOf
- JS: Get Set Prototype
- JS: Show Prototype Chain 💠
- JS: Create Object
- JS: Object Literal Expression
- JS: Object.create
- JS: Object Literal Expression vs Object.Create
- JS: Create Object with Parent X
- JS: Prevent Adding Property
- JS: Deep Copy Array or Object 💠
- JS: Test Equality of Array and Object by Content 💠
- JS: Add Method to Prototype
- JS: Object (class)
- JS: Object Constructor
- JS: Object.prototype