if else changing a text field
<p>I have this code and it is not working It is just for testing.</p>

<p>HTML</p>

<pre><code>&lt;a id="sp"&gt;test&lt;/a&gt;&lt;/li&gt;
</code></pre>

<p>JavaScript</p>

<pre><code>document.getElementById('sp').innerHTML = 'test1';

var a == 'undefined'
IF (a == "undefined"){
    document.getElementById('sp').innerHTML = 'inline';
}ELSE{
     document.getElementById('sp').innerHTML = 'inline1';
}
</code></pre>

<p>The code is not entering the <code>if</code>. Can anyone help me?</p>
