Array sum in JavaScript.