結果 : javascript update variable outside of function