In JavaScript, how would one write a function that converts a given [edit: positive integer] number (below 100 billion) into a 3-letter abbreviation -- where 0-9 an
I think you cant try this numeraljs/ If you want convert 1000 to 1k
console.log(numeral(1000).format('0a'));
and if you want convert 123400 to 123.4k try this
console.log(numeral(123400).format('0.0a'));