Format Numeric Values

This snippet put spaces between “number groups” to make the number more readable.

// 12244556215 -> 12 244 556 215
function format(value)
{
    return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
}
Need a web developer? Maybe we can help, get in touch!