結果 : define a function within a function javascript