結果 : how to put a function inside a function javascript