Customize Math.round JS | Round up number to n decimal places Javascript:
E.g: roundUp(1.005, 2) = 1.01
roundUp(1.001, 2) = 1.00
roundUp(1.009, 2) = 1.01
The main idea is using toFixed function, but I added one more step to check for case 1.005
Source code at https://codepen.io/hoavd/pen/rYqaJL