Saturday, 7 May 2022

JAVASCRIPT + CSS + HTML #39 | While Loop JAVASCRIPT |How to Make Do While Loop JS | Web Development

 <!DOCTYPE html>

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>

        // while loop
        // let a= 66;
        // while (a<69) {
        //     console.log(`${a} is smaller`);
        //     a++;
           
        // }


        // do while loop
        let a = 26;
        do {
            console.log(`${a} `);
            a++;
           
        } while (a<55);
    </script>
</head>
<body>
   
</body>
</html>




No comments:

Post a Comment

JAVASCRIPT + CSS + HTML #42 | Event & Event Listener |How to Target using JS | Web Development

  <! DOCTYPE html > < html lang = "en" > < head >     < meta charset = "UTF-8" >     < met...