結果 : js loop through array and update values