Understanding Computation in JavaScript