do { //code block to be executed } while(condition);
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- </head>
- <body>
- <input type="button" onclick="fun_dowhile()" value="Execute do..while loop">
- <script>
- function fun_dowhile()
- {
- var i = 0;
- //inside the statement execute at least once
- do {
- alert(i);
- i++; //increment 1 with i value
- } while (0 == 3);
- }
- </script>
- </body>
- </html>
Do while :- genius student
Reviewed by Network security
on
October 18, 2019
Rating:
No comments: