I am using the code below, that iterating over select options. I checked if options value has already entered. It escapes from for-each but it doesn't exit from method.

```
yeniIlacBagla_ilacBagla: function(){
    $("#bagliIlaclar > option").each(function(){
        if(this.value===$("#baglanacakIlacID").val()){
            alert($("#baglanacakIlacAdi").val()+'\n adlı ilaç zaten bağlıdır!'); 
            return;
        }else{
            $("#bagliIlaclar").append($('<option></option>').val($("#baglanacakIlacID").val()).html($("#baglanacakIlacAdi").val()));
        }
    });
}

```