結果 : javascript run function if defined