Javascript Chp 7 Loops in Javascript

 


        // assign a value , condition , increment counter
        // As you can see this is a for loop which
        //  is used when we
        //know the starting an ending point of a code

        // for(i = 0;i<=100;i++){
        //     console.log(i);
        // }


        //That's how you can use while loops !!
    //     let num= 123456;
       
    //     while(num>0){
    //   console.log(num%10);
    //   num = parseInt(num/10);
    //     }


        for(i = 0;i<=100;i++){
            if (i%3===0) {
                 console.log(i);
            }
        }
 

Comments

Popular posts from this blog

HTML FORMS

FORM STYLING IN CSS