Untuk jumlah loop dalam javascript
let sum = 0;
for (let i = 1; i <= 6; i++) {
sum = sum + i;
}
console.log(sum)
//Output: 21
Ariful Islam Adil(Code Lover)
let sum = 0;
for (let i = 1; i <= 6; i++) {
sum = sum + i;
}
console.log(sum)
//Output: 21
let sum = 0;
for (let i = 0; i < 5; i++) {
for (let j = 0; j < 2; j++) {
if (i >= 2) {
continue;
}
sum = sum + i + j;
}
}
console.log(sum);