How to put toFixed if there is a multiplication?

  • 0
    How to put toFixed to the 'k' variable correctly?

    progrNumPer.innerHTML = '(' + k * 0.2 + '%' + ')';
    JavaScript Anonymous, Oct 28, 2019

  • 1 Answers
  • 0
    k = k.toFixed(2)
    progrNumPer.innerHTML = '(' + k*0.2 + '%' +')';
    Micah Rojas

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!