typeof - JavaScript | MDN
The typeof operator returns a string indicating the type of the operand's value.