結果 : check if method exists javascript