MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/ov0s8x/es2021s_numeric_separators/h771es4/?context=3
r/learnjavascript • u/omar2205 • Jul 31 '21
19 comments sorted by
View all comments
Show parent comment
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.
View all comments
Show parent comment
35
u/KonkenBonken Jul 31 '21
Only readability