This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis
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
console.log(1_234_456_789.01);
// 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! 🎉
75 | 75 | 79 | 70 | 79 | 13 | 13 | 11.0 | 75 |
Reply to Stefan
This content originally appeared on Stefan Judis Web Development and was authored by Stefan Judis
Stefan Judis | Sciencx (2022-01-14T23:00:00+00:00) JavaScript numeric separators are cross-browser supported (#blogPost). Retrieved from https://www.scien.cx/2022/01/14/javascript-numeric-separators-are-cross-browser-supported-blogpost/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.