setInterval won't get out of loop
<p>The following javascript code takes randomly selected value from a array and types it in the input box. I've used jquery. I want to end setInterval "zaman2", so after It ends I can retype the next random string to the input box. But the loop doesn't end and gets stuck. How can I solve this?
Link to jsFiddle: <a href="http://jsfiddle.net/AQbq4/4/" rel="nofollow">http://jsfiddle.net/AQbq4/4/</a></p>

<pre><code>var dersler = [...very long list...];
var zaman = setTimeout(function() {
    var yeniDers = dersler[Math.floor(Math.random()*dersler.length)];
    sayac = 0;
    var zaman2 = setInterval(function() {
            var harf = yeniDers.slice(0,(sayac+1));
            sayac++;
            $('#main-search').attr('placeholder', harf).typeahead({source: dersler});
        if (sayac == yeniDers.length) {
            clearInterval(zaman2);
        }
    },450);
},2000);
</code></pre>
