結果 : how to send a function as parameter javascript