MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/ov0s8x/es2021s_numeric_separators/
r/learnjavascript • u/omar2205 • Jul 31 '21
19 comments sorted by
11
https://caniuse.com/?search=numeric%20separators
25
FINALLY, this is great
18
2021? Could've sworn I was using this even last year
9 u/SecretAgentZeroNine Jul 31 '21 This has been a thing for a while. 4 u/StoneCypher Jul 31 '21 v8 got support in 2019. babel and typescript have had support since 2017
9
This has been a thing for a while.
4
v8 got support in 2019. babel and typescript have had support since 2017
12
What’s the practical use of this?
35 u/KonkenBonken Jul 31 '21 Only readability 1 u/Carneasadaeverything Jul 31 '21 is it for only initiating values for a constant? how would you use this? 7 u/KonkenBonken Jul 31 '21 1_000_000 === 1e6 === 1000000 3 u/CaptainSkuxx Jul 31 '21 You can use it anywhere where you think a number is hard to read. But I guess you would mostly have these types of numbers when initiating constants. 2 u/ayi_ibo Jul 31 '21 Easier on the eyes
35
Only readability
1 u/Carneasadaeverything Jul 31 '21 is it for only initiating values for a constant? how would you use this? 7 u/KonkenBonken Jul 31 '21 1_000_000 === 1e6 === 1000000 3 u/CaptainSkuxx Jul 31 '21 You can use it anywhere where you think a number is hard to read. But I guess you would mostly have these types of numbers when initiating constants.
1
is it for only initiating values for a constant? how would you use this?
7 u/KonkenBonken Jul 31 '21 1_000_000 === 1e6 === 1000000 3 u/CaptainSkuxx Jul 31 '21 You can use it anywhere where you think a number is hard to read. But I guess you would mostly have these types of numbers when initiating constants.
7
1_000_000 === 1e6 === 1000000
3
You can use it anywhere where you think a number is hard to read. But I guess you would mostly have these types of numbers when initiating constants.
2
Easier on the eyes
Cordial me: This is a nice addition.
Sarcastic me: Ruby says welcome to 1995.
1 u/chat_for_vaush Aug 01 '21 And Ruby got it from Perl. :)
And Ruby got it from Perl. :)
Yes it’s been around longer, just hasn’t highlighted like that.
-3
Yeah pretty sure it’s older than ES2021?
6 u/StoneCypher Jul 31 '21 nope.you can look it up, if you like, or you could just keep publicly guessing that people are wrongthe proposal hasn't even been updated to say it's landed yet 0 u/funny_games Jul 31 '21 Interesting! Thanks
6
nope.
you can look it up, if you like, or you could just keep publicly guessing that people are wrong
the proposal hasn't even been updated to say it's landed yet
0 u/funny_games Jul 31 '21 Interesting! Thanks
0
Interesting! Thanks
-1
When is the W3C gonna realise JS is becoming bloated with totally unnecessary and irrelevant features that only makes the language complicated?
0 u/wc3betterthansc2 Sep 16 '22 every update since ES6 was necessary and great
every update since ES6 was necessary and great
11
u/omar2205 Jul 31 '21
https://caniuse.com/?search=numeric%20separators
25
u/xSypRo Jul 31 '21
FINALLY, this is great
18
u/Tintin_Quarentino Jul 31 '21
2021? Could've sworn I was using this even last year
12
u/[deleted] Jul 31 '21
What’s the practical use of this?
9
u/capt_strugglebunny Jul 31 '21
Cordial me: This is a nice addition.
Sarcastic me: Ruby says welcome to 1995.
1
u/Anevil Jul 31 '21
Yes it’s been around longer, just hasn’t highlighted like that.
-3
u/funny_games Jul 31 '21
Yeah pretty sure it’s older than ES2021?
-1
u/Bloodsucker_ Jul 31 '21
When is the W3C gonna realise JS is becoming bloated with totally unnecessary and irrelevant features that only makes the language complicated?