undefined is a global property (variable) with a constant value. Javascript treats undefined as being equal to null.
Sample code
<html>
<body>
<script type="text/javascript">
var test;
if (test==null)
{
alert("null");
}
if (test==undefined)
{
alert("undefined");
}
</script>
</body>
</html>
No comments:
Post a Comment