typeof
operator determines the type of the input
For example,
console.log(typeof 9.8)
The output will be - "number"
console.log(typeof "Gravitational acceleration of Earth is 9.8ms^-2")
The output will be - "string"
console.log(typeof true)
The output will be - boolean
Thank you for reading, have a nice day!
- Follow me on Twitter - @codewithsnowbit
- Subscribe me on YouTube - Code With SnowBit
Top comments (0)