title: How do I get this function to add or subtract from a range and return it?
body: <p>I'm trying to have the function "RipIt" (not my name) take this list of Dewey Decimal Numbers and add or subtract from those numbers if certain conditions are met (e.g. All numbers between 100 and 200, add 100, as in first else if statement) and return the answer when the button is clicked, along with a text notification or alert that says this has been changed. I'm a total beginner and I'm stuck on the last part - making the function add or subtract and give me the answer. Can anyone help? TOTAL BEGINNER so please be gentle, thank you!!</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  function RipIt() {
      for(var i = l; i &lt;= 25; i++) {
          var dewey = parseFloat(document.getElementById(i).innerHTML);
  
          if(dewey &gt;= 100 &amp;&amp; 200 &gt;= dewey) {
              document.getElementById(dewey) + 100
          } else if(dewey &gt;= 400 &amp;&amp; 500 &gt;= dewey) {
              document.getElementById(dewey) + 200
          } else if(dewey &gt;= 850 &amp;&amp; 900 &gt;= dewey) {
              document.getElementById(dewey) - 100
          } else if(dewey &gt;= 600 &amp;&amp; 650 &gt;= dewey) {
              document.getElementById(dewey) + 17
          }
      }
  }
  &lt;/script&gt;
  &lt;/head&gt;     
  &lt;body&gt;
  
  &lt;h4&gt;Records to Change&lt;/h4&gt;
  &lt;ul id="myList"&gt;
    &lt;li id ="1"&gt;101.33&lt;/li&gt;
    &lt;li id = "2"&gt;600.01&lt;/li&gt;
    &lt;li id = "3"&gt;001.11&lt;/li&gt;    
  &lt;li id = "4"&gt;050.02&lt;/li&gt;
    &lt;li id = "5"&gt;199.52&lt;/li&gt;
    &lt;li id = "6"&gt;400.27&lt;/li&gt;
  &lt;li id = "7"&gt;401.73&lt;/li&gt;
    &lt;li id = "8"&gt;404.98&lt;/li&gt;
    &lt;li id = "9"&gt;no number&lt;/li&gt;
  &lt;li id = "10"&gt;850.68&lt;/li&gt;
    &lt;li id = "11"&gt;853.88&lt;/li&gt;
    &lt;li id = "12"&gt;407.8&lt;/li&gt;
    &lt;li id = "13"&gt;878.22&lt;/li&gt;
    &lt;li id = "14"&gt;175.93&lt;/li&gt;
    &lt;li id = "15"&gt;175.9&lt;/li&gt;
  &lt;li id = "16"&gt;176.11&lt;/li&gt;
    &lt;li id = "17"&gt;190.97&lt;/li&gt;
    &lt;li id = "18"&gt;90.01&lt;/li&gt;
  &lt;li id = "19"&gt;191.001&lt;/li&gt;
    &lt;li id = "20"&gt;600.95&lt;/li&gt;
    &lt;li id = "21"&gt;602.81&lt;/li&gt;
  &lt;li id = "22"&gt;604.14&lt;/li&gt;
    &lt;li id = "23"&gt;701.31&lt;/li&gt;
    &lt;li id = "24"&gt;606.44&lt;/li&gt;
    &lt;li id = "25"&gt;141.77&lt;/li&gt;
  
  &lt;/ul&gt;
  &lt;b&gt; &lt;/b&gt;
  &lt;input type="button" value="Click To Run" onclick="RipIt()"&gt;
  &lt;!-- &lt;input type="button" value="Click Here" onClick="showAlert();"&gt; --&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>