Calculations

Report a typo

Put the following code into the console and enter the value in the entry field.

let n = 0;
let k = 10;
let res = 0;
for (; n < k; n++) {
    res += n + k;
    k--;
}
console.log(res);
Enter a number
___

Create a free account to access the full topic