title: Replacing a text value in a table cell with Javascript
body: <p>I am really struggling to mask a data value with Javascript. I work at a school, and they are doing away with "traditional" grading. As such, they don't want their gradebook to display percentages, but instead show words based on percentages (yeah I know). I would like to replace the % value with a word string. With this JS, it correctly alerts me all the values, but the return value never replaces the % value in the cell. What am I missing? I am extremely new to JS so it may be a simple mistake.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('.percentage').each(function() {
    var corrected = $(this).html();
    corrected = parseFloat(corrected);
    alert(corrected);
    switch (true) {
      case (corrected &lt; 48.75):
        return 'Unsatisfactory';
        break;
      case (corrected &lt; 61.25):
        return 'Approaching ';
        break;
      case (corrected &lt; 73.75):
        return 'Approaching+ ';
        break;
      case (corrected &lt; 86.25):
        return 'Meeting ';
        break;
      case (corrected &lt; 94.9):
        return 'Meeting+ ';
        break;
      case (corrected &lt;= 100):
        return 'Exceeding ';
        break;
      default:
        return 'N/A';
    }
  
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>