title: Replacing NULL with empty string in jQuery each()?
body: <p>The parameter <em>fights</em> below is the result from an Ajax call. Some of the data has <code>NULL</code> values. What's a simple way of replacing those values with an empty string?</p>
  
  <pre><code>    function createFightsTable(fights) {
  
          $.each(fights, function() {
  
              $("#professional_fights_table tbody").append("&lt;tr&gt;&lt;td class='text-center'&gt;" + this.result  + "&lt;/td&gt;&lt;td&gt;" + this.record  + "&lt;/td&gt;&lt;td&gt;" + this.opponent  + "&lt;/td&gt;&lt;td&gt;" + this.method  + "&lt;/td&gt;&lt;td&gt;" + this.date  + "&lt;/td&gt;&lt;td class='text-center'&gt;" + this.round  + "&lt;/td&gt;&lt;td&gt;" + this.time  + "&lt;/td&gt;&lt;/tr&gt;"); 
          });
      }
  </code></pre>