結果 : how to use a variable outside of a function javascript