Use false to create boolean variable in JavaScript

Description

The following code shows how to use false to create boolean variable.

Example


<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
<!--from  w ww.j a v a 2 s.co  m-->
var myVariable=false;
document.write(myVariable);
</script>
</body>
</html>

Click to view the demo

The code above generates the following result.

Use false to create boolean variable in JavaScript