console.log(remove_first_occ("The quick brown fox jumps over the lazy dog", 'the'));

function remove_first_occ(str,find)
{
    var temp = str.split(' ');
   // console.log(temp);
    var sp ;
    for(var i = 0; i<=temp.length; i++)
    {
        if(temp[i] === find)
        {
            console.log(i);
            sp =temp.splice(i,1)
            console.log(sp);
        }
    }
    
    
    return temp;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: