How can I do this in JavaScript?
var num = 2046430; num.toLocaleString(); will give you "2,046,430";
What I have tried is:
var num = 2046430; num.toLocaleString().toFixed(2);
Expected Output
"2,046,430.00"
©2020 All rights reserved.