Formatting numbers
Sometimes, there may be lot of zeroes in a number. While displaying big numbers, it is often better to show the number as 1.2M or 25B. toLocaleString provides a neat way to do it.
numberValue.toLocaleString('en-US', {
minimumFractionDigits: 1,
...
vijayt.hashnode.dev1 min read