Use or (||) in do-while condition : Do While : Statement JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Statement » Do While »

 

Use or (||) in do-while condition

















<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!--
do
{
    sometext = prompt("Enter some text","Type some text");
}
while (sometext == "Type some text" || sometext == "" || sometext == null);
alert(sometext);
//  -->
</script>
</head>
<body>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Statement
» Do While