Skip to content

Latest commit

 

History

History
24 lines (13 loc) · 542 Bytes

numeric-separators.md

File metadata and controls

24 lines (13 loc) · 542 Bytes

Numeric separators

Large numeric literals are difficult for the human eye to parse quickly, especially when there are lots of repeating digits.

Information

Reference Material:

Examples and Explanation

When working with big numbers in javascript, you can use _ to visually seperate the digits.

let firstNumber = 1_000_000_000_000;
let secondNumber = 1000000000000

console.log(firstNumber === secondNumber);  //  true