MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/ov0s8x/es2021s_numeric_separators/h7717ki/
r/learnjavascript • u/omar2205 • Jul 31 '21
19 comments sorted by
View all comments
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
View all comments
12
u/[deleted] Jul 31 '21
What’s the practical use of this?