Which operator is used to get the data type of a variable?

  • typeof
  • instanceof
  • typeofof
  • datatype
The typeof operator in JavaScript is used to determine the data type of a variable. For example, you can use it as typeof variableName to obtain a string representing the data type of the variable. It's a helpful tool for debugging and handling different data types dynamically in your code.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *