type
type(obj) ⇒ String
Section titled “type(obj) ⇒ String”Check what type is provided
Kind: global function
Returns: String - String
| Param | Type |
|---|---|
| obj | any |
Example
console.log(type(null))console.log(type(undefined))console.log(type(5))console.log(type(true))console.log(type('str'))