結果 : how to get variable out of function javascript