結果 : check if function is empty javascript