Get variable type : typeof : Operators JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Operators » typeof »

 

Get variable type

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
var x = "Hello", y;
alert("Variable x value is " + typeof(x));
alert("Variable y value is " + typeof(y));
alert("Variable z value is " + typeof(z));
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Operators
» typeof