Write conditionals from data returned of an xml parse
<p>Can someone please help me understand how I would write this.</p>

<p>If i am parsing data from an xml file like:</p>

<pre><code>function  parseXml(xml) {
    $(xml).find("ITEM").each(function()
  {
    var foo= $("bar", this).text();
    $("#container").append('&lt;div&gt;' + (foo) + '&lt;/div&gt;');
  });
}
</code></pre>

<p>How would I write a statement like if foo = hello then return goodbye and have that output but otherwise just return foo?</p>
