loop

PHOTO EMBED

Sun Jul 11 2021 11:55:31 GMT+0000 (UTC)

Saved by @buildadev

var sum = 0;

for (var i = 0; i <= 10; i++) {
  sum = sum + i;
  //value of i will get updated each time
}

console.log("Value of sum is" + sum);
content_copyCOPY