adding iterating arrays exercise in javascript