What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-02-12 03:45:21
javascript convert number from thousands to k and millions to m
// converts number to string representation with K and M. // toFixed(d) returns a string that has exactly 'd' digits // after the decimal place, rounding if necessary. function numFormatter(num) { if(num > 999 && num < 1000000){ ... Add solution
Best helpers
V. G.
+5
Legion123
+5
RBarryYoung
+5
Shawn Wang
+5
LBushkin
+5
OgWestside
+5
Ryan McClure
+5
Mlevin
+5
Darah
+5
Jesse McGrew
+5
PeerPaso
+5
Bad Dog
+5
Cledoux
+5
Tae-gon Kim
+5
Jacques27
+5
E meyr
+5
Pavel Savko
+5
Jude Angione
+5
Human
+5
Aeth
+5
Iwlpe
+5