Output the type information : typeof « Data Type « JavaScript DHTML






Output the type information

 

<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>

   
  








Related examples in the same category

1.Use typeof to check the type for different type variables