Do...While Loop- Do while loop is similar to the while loop except that the condition check happens at the end of the loop that means loop will always be executed at once even if the condition is false.
E.g.
E.g.
<html>
<head>
<title>Do...While Loop Statement</title>
</head>
<body>
Do While Loop
<Br>
<Script language="JavaScript">
var a=0;
do
{
document.write(a + "<Br>");
a++;
}
while(a<10)
</script>
</body>
</html>
Check Output: Related Topics:
- JavaScript Introduction
- Variables in JavaScript
- JavaScript Function
- Accessing JavaScript Function
- Creating JavaScript interactive form
- Accessing form field value
- Creating interactive form login webpage
- Networking Fundamentals
- TCP/IP and Internet addressing
- Internet Working
- Internet Working Servers
- Concept and need for web publishing
- Web languages
- Javascript Control Structure
- Checking Text is Letter/s
- Checking Text is Number/s
- Checking Textbox is Empty or not
- Addition of two numbers
- Subtraction of two numbers
- Multiplication of two numbers
- Division of two numbers
- Form field validations
- Email validation