var n = 0; var x = 0; while (n < 3){ n++ ; x += n; console.log(n); }