JavaScript has a flexible variable type

The flexible nature of JavaScript variable types can lead to confusion as to the particular type of a variable at any given time in a script. To address this concern JavaScript provides the typeof operator. The typeof operator returns the current variable type of the specified variable.


Other examples in Variables (JavaScript tutorial)
Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 4.0