Open the console (Cmd+option+J on Chrome) and Refresh
You'll what's going on step by stepvar numbers = new Array(3); // Create array with 3 undefined elements console.log(numbers); numbers[0] = 90; numbers[1] = 150; numbers[2] = 30; var a = numbers[0] + numbers[1]; // Sets variable 'a' to 240 var b = numbers[1] + numbers[2]; // Sets variable 'b' to 180 console.log(numbers); console.log("a=%d and b=%d", a,b);