結果 : how to write a function inside a function in javascript