The typeof operator can be used to get the datatype of its operand. The specified operand can be a data structure or a literal such as a function, object or a variable.