34,333
edits
Changes
→The JavaScript ''typeof'' Operator
== The JavaScript ''typeof'' Operator ==
The flexible nature of JavaScript variable types (JavaScript is termed a ''loosely typed language'') can lead to confusion as to the particualr 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. For example the following script:
<pre>