Artboard 16Google Sheets iconSwift icon
Published at
Updated at
Reading time

Suppose you're dealing with big numbers in JavaScript, you might know that they're becoming harder to read with every digit. Look at 123456789 โ€“ how many millions is that? I don't know! ๐Ÿคทโ€โ™‚๏ธ

To solve this readability issue JavaScript implements numeric separators.

// Make large numbers more readable with numeric separators

// 1234456789.01

I was aware that the language addition is around the corner, but surprisingly, I just realized, they're cross-browser-supported these days! ๐ŸŽ‰

MDN Compat Data (source)
Browser support info for Numeric separators (1_000_000_000_000)

Was this post helpful?
Yes? Cool! You might want to check out Web Weekly for more web development articles. The last edition went out 8 days ago.

Related Topics

Related Articles