Skip to content

Commit 63d069e

Browse files
committedMar 23, 2021
numeric-separators
1 parent f49f4ef commit 63d069e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
 

‎pages/numeric-separators.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Numeric separators
2+
3+
- Author: [0x4bd0](https://github.com/0x4bd0)
4+
5+
Large numeric literals are difficult for the human eye to parse quickly, especially when there are lots of repeating digits.
6+
7+
## Information
8+
9+
Reference Material:
10+
11+
- [V8](https://v8.dev/features/numeric-separators)
12+
13+
## Examples and Explanation
14+
15+
When working with big numbers in javascript, you can use _ to visually seperate the digits.
16+
17+
```js
18+
let firstNumber = 1_000_000_000_000;
19+
let secondNumber = 1000000000000
20+
21+
console.log(firstNumber === secondNumber); // true
22+
```
23+
24+

0 commit comments

Comments
 (0)
Please sign in to comment.