結果 : javascript loop through array and update values