title: Simplifying multiple similar If statements (JAVASCRIPT)
body: <p>Im working on a code for an adobe acrobat form, I want to add the following code:</p>
  <pre><code>var total =6301
  var warranty
  if (0 &lt; total &amp;&amp; total &lt;= 3300){warranty = 194.25}
  else if (3300 &lt; total &amp;&amp; total &lt;= 4000){warranty = 197.5}
  else if (4000 &lt; total &amp;&amp; total &lt;= 5000){warranty = 202.15}
  else if (5000 &lt; total &amp;&amp; total &lt;= 6000){warranty = 206.75}
  else if (6000 &lt; total &amp;&amp; total &lt;= 7000){warranty = 211.45}
  else if (7000 &lt; total &amp;&amp; total &lt;= 8000){warranty = 216.1}
  else if (8000 &lt; total &amp;&amp; total &lt;= 9000){warranty = 220.75}
  else if (9000 &lt; total &amp;&amp; total &lt;= 10000){warranty = 225.4}
  else if (10000 &lt; total &amp;&amp; total &lt;= 11000){warranty = 230.1}
  else if (11000 &lt; total &amp;&amp; total &lt;= 12000){warranty = 234.75}
  else if (12000 &lt; total &amp;&amp; total &lt;= 13000){warranty = 239.4}
  else if (13000 &lt; total &amp;&amp; total &lt;= 14000){warranty = 243.95}
  else if (14000 &lt; total &amp;&amp; total &lt;= 15000){warranty = 248.7}
  else if (15000 &lt; total &amp;&amp; total &lt;= 16000){warranty = 253.3}
  else if (16000 &lt; total &amp;&amp; total &lt;= 17000){warranty = 258}
  else if (17000 &lt; total &amp;&amp; total &lt;= 18000){warranty = 262.65}
  else if (18000 &lt; total &amp;&amp; total &lt;= 19000){warranty = 267.3}
  else if (19000 &lt; total &amp;&amp; total &lt;= 20000){warranty = 271.95}
  else if (20000 &lt; total &amp;&amp; total &lt;= 21000){warranty = 276.6}
  else if (21000 &lt; total &amp;&amp; total &lt;= 22000){warranty = 281.3}
  else if (22000 &lt; total &amp;&amp; total &lt;= 23000){warranty = 285.9}
  else if (23000 &lt; total &amp;&amp; total &lt;= 24000){warranty = 290.5}
  else if (24000 &lt; total &amp;&amp; total &lt;= 25000){warranty = 295.25}
  else if (25000 &lt; total &amp;&amp; total &lt;= 26000){warranty = 299.85}
  else if (26000 &lt; total &amp;&amp; total &lt;= 27000){warranty = 304.55}
  else if (27000 &lt; total &amp;&amp; total &lt;= 28000){warranty = 309.15}
  else if (28000 &lt; total &amp;&amp; total &lt;= 29000){warranty = 313.85}
  else {warranty = 999999}
  </code></pre>
  <p>I want to have this be a lot less repetitive as I have a lot more conditions similar to the ones above.</p>
  <p>Thanks for the help in advance!!</p>