I would leverage Javascript’s own method for formatting numbers like this:
numSlider= effect("Slider Control")("Slider").value;
new Intl.NumberFormat('en-US', {notation: 'compact', maximumFractionDigits: 2}).format(numSlider);
A possible downside is that it uses rounding and not floor, so 1599 is 1.6K and 1609 is 1.61K
The positive thing is that it automatically does K, M, B, T and if you select a different language/region, it will use the correct for that region.
For example use ‘ms’ instead of ‘en-US’ and it will be K, J, B, T for Malaysian ‘juta’
use ‘fr-FR’ and you’ll get k M Md Bn (the French convention) but use ‘fr-CA’ and you get k M G T (the Canadian convention)