Javascript while Statement Question 1

Introduction

We would like to know the output of the following code:

let number = 1; 
let sum = 0; 
while (number < 11) { 
   sum += number; 
   ++number; 
} 
console.log(sum);


55



PreviousNext

Related