Converts a number into an abbreviated string representation. For example, 1500 becomes '1.5k', 2000000 becomes '2m', etc.
The number to be abbreviated.
The abbreviated string representation of the input number.
abbreviatedNumber(1500); // Returns '1.5k'abbreviatedNumber(2000000); // Returns '2m' Copy
abbreviatedNumber(1500); // Returns '1.5k'abbreviatedNumber(2000000); // Returns '2m'
Converts a number into an abbreviated string representation. For example, 1500 becomes '1.5k', 2000000 becomes '2m', etc.