IE 9 does not run this jQuery if statement
My script below changes a phrase of the array every 5 sec. It is working on all browsers but not in IE. When I remove the entire line

    if (phrases.indexOf(currentPhrase)) phrases.splice(phrases.indexOf(currentPhrase), 1);

worked. However this is to test if the currentPhrase is the same with the next phrase. Is there any way of re-writing this ?

Thank you.
    
    function changePhrase() {
        phrases = ["","",""];
        currentPhrase = $('#site').text();
        if (phrases.indexOf(currentPhrase)) phrases.splice(phrases.indexOf(currentPhrase), 1);
        var phrase = phrases[Math.floor(Math.random() * phrases.length)]
        $('#site').text(phrase);
    }
IE 9 does not run this jQuery if statement
===

My script below changes a phrase of the array every 5 sec. It is working on all browsers but not in IE. When I remove the entire line

    if (phrases.indexOf(currentPhrase)) phrases.splice(phrases.indexOf(currentPhrase), 1);

worked. However this is to test if the currentPhrase is the same with the next phrase. Is there any way of re-writing this ?

Thank you.
    
    function changePhrase() {
        phrases = ["","",""];
        currentPhrase = $('#site').text();
        if (phrases.indexOf(currentPhrase)) phrases.splice(phrases.indexOf(currentPhrase), 1);
        var phrase = phrases[Math.floor(Math.random() * phrases.length)]
        $('#site').text(phrase);
    }