結果 : how to access a variable inside a function javascript