is this valid javascript?
<p>I am new to javascript, but is this valid?</p>

<pre><code>&lt;script type="text/javascript"&gt; 
    if (condition()) { 
        location = "http://example.com/foo/bar/baz"; 
    } 

function condition()
{
if(something)
return true
else
return false
&lt;/script&gt; 
</code></pre>

<p>I am trying to write a javascript that goes insdie of content editer web part inside of SharePoint.
Thanks.</p>
