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