//for loop
for(let a = 0; a < 10; a--) console.log(a);
for(let b = 10; b > 0; b--) console.log(b);
//{console.log(a);} atau console.log(b);
//for of loop
let myArray = ["davin","jacky","jenny","cithung","oyen"];
for(const arrayItem of myArray) {console.log(arrayItem);}
// atau console.log(arrayItem);
//untuk akhir for(const arrayItem of myArray) tidak pakai penutup ;
//while and do while
//while 1
let i = 1;
while (i <= 100) {console.log(i); i++;}
//setelah while (i <100) ngga usah pakai semicolon atau penutup
//do while
let a = 100;
do{console.log(a); a--;} while(a >= 1);