Kurangi desimal menjadi 4 digit JavaScript

var myNumber = 2;

myNumber.toFixed(2); //returns "2.00"
myNumber.toFixed(1); //returns "2.0"
Grieving Gharial