let arr = JSON.parse(localStorage.getItem('result')) || [];
...
localStorage.setItem('result', JSON.stringify(arr));
function intToString(value) {
var suffixes = ["", "k", "m", "b","t"];
var suffixNum = Math.floor((""+value).length/3);
var shortValue = parseFloat((suffixNum != 0 ? (value / Math.pow(1000,suffixNum)) : value).toPrecision(2));
if (shortValue % 1 != 0) {
var shortNum = shortValue.toFixed(1);
}
return shortValue+suffixes[suffixNum];
}
// 19k
alert( intToString(19410) )