title: how to get percentage with 2 decimals in javascript
body: <p>i want to get percentage with max of 2 decimals not more than that. im getting output like this Total Score is <strong>26.666666666666668 %</strong></p>
  
  <p>desired output 26.66%</p>
  
  <pre><code>if(pos &gt;= questions.length){
          test.innerHTML = "&lt;h2&gt;You gave  "+correct+" CORRECT answers out of "+questions.length+" questions &lt;/h2&gt;&lt;br/&gt;&lt;h3&gt;Total Score is "+correct/questions.length * 100 +"  %&lt;/h3&gt;";
          _("test_status").innerHTML = "Quiz 1 Completed";
          pos = 0;
          correct = 0;
          return false;
      }
  </code></pre>