title: Absolute value Javascript
body: <p>I am trying to create a MPL (multiple price list.) on otree (using PyCharm).
  For one of my app (WTP) I wrote this code on the html &quot;folder&quot; (using Javascript):</p>
  <pre><code>{% if choice.0 &gt; 0 %}  If you are paid {{choice.0}} points for this item, would you accept?
      {% elif choice.0 == 0 %}
          If you are paid {{choice.0}} points for this item, would you accept?
      {% elif choice.0 &lt; 0 %}
          If you have to pay {{choice.0}} points for this item, would you accept?
      {% endif %}
  </code></pre>
  <p>the different choices being defined on pages.py:</p>
  <pre><code>  self.participant.vars['choices'] = [
          [+30, &quot;choice1&quot;, &quot;choice1-yes&quot;, &quot;choice1-no&quot;],
          [+20, &quot;choice2&quot;, &quot;choice2-yes&quot;, &quot;choice2-no&quot;],
          [+10, &quot;choice3&quot;, &quot;choice3-yes&quot;, &quot;choice3-no&quot;],
          [0, &quot;choice4&quot;, &quot;choice4-yes&quot;, &quot;choice4-no&quot;],
          [-10, &quot;choice5&quot;, &quot;choice5-yes&quot;, &quot;choice5-no&quot;],
          [-20, &quot;choice6&quot;, &quot;choice6-yes&quot;, &quot;choice6-no&quot;],
          [-30, &quot;choice7&quot;, &quot;choice7-yes&quot;, &quot;choice7-no&quot;],
  </code></pre>
  <p>However, I would like all the numbers to appear without the &quot;minus&quot; sign on the participants' screen. How can I modify my Javascript code s.t. -10 becomes 10, -20 becomes 20 and -30 becomes 30.</p>
  <p>Thanks!</p>