Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- <meta charset="utf-8">
- <script type="text/javascript">
- //ператор управления while
- console.log('цикл while');
- //
- /*
- while(<условие>){
- //потвторяющийся код
- }
- */
- /*let i = 0;
- while(i<3){
- console.log(i);
- i = i + 1; // изменеям значение переменной i на 1
- }
- console.log('цикл while завершен');*/
- // написать цикл while который будет
- //выводить числа от 10 до -10 включительно
- let i = 10;
- while(i>-11){
- console.log(i);
- i = i - 1;
- }
- </script>
- </head>
- <body>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment