結果 : how to define function in object javascript