title: JavaScript/jQuery: replace part of string?
body: <p>With text like this:</p>
  
  <pre><code>&lt;div class="element"&gt;
  &lt;span&gt;N/A, Category&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to get rid of every occurrence of <code>N/A</code>.</p>
  
  <p>Here is my attempt:</p>
  
  <pre><code>$('.element span').each(function() {
          console.log($(this).text());
          $(this).text().replace('N/A, ', '');
      });
  </code></pre>
  
  <p>The logged text is the text inside of the span so the selector is okay.</p>
  
  <p>What am I doing wrong here?</p>