Using if statement inside for loop - Javascript
<p>I have a Javascript For Loop...</p>

<pre><code>var CookieName = "Tab,EduTab,EduTab,user";
var tString = CookieName.split(',');

for(i = 0; i &lt; tString.length; i++){

    if (tString[i] == "EduTab") {
        document.write("&lt;b&gt;"+tString[i]+"&lt;b&gt;"); 
    } else {
        document.write(tString[i]);
    }
}
</code></pre>

<p>For some reason it is failing to bold the 'EduTab'. It will either bold the entire array CookieName or none at all. Any help would be awesome. Thanks.</p>
