本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

typeof

Returns the type of the specified variable.

Syntax

 typeof variableName || typeof(variableName)

Example

 
var myNumber = 5;
typeof(myNumber); //Returns "number".