Python Add All Values In Array Javascript Iteration