Skip to content

Instantly share code, notes, and snippets.

@alecat88
Created March 2, 2022 00:01
Show Gist options
  • Save alecat88/4f3f8551ac814312b002c5275d8d3ef3 to your computer and use it in GitHub Desktop.
Save alecat88/4f3f8551ac814312b002c5275d8d3ef3 to your computer and use it in GitHub Desktop.
// Decimal integer literal with digits grouped by thousand.
let n1 = 1_000_000_000;
console.log(n1); // This will print: 1000000000
// Decimal literal with digits grouped by thousand.
let n2 = 1_000_000_000.150_200
console.log(n2); // This will print: 1000000000.1502
// Hexadecimal integer literal with digits grouped by byte.
let n3 = 0x95_65_98_FA_A9
console.log(n3); // This will print: 641654651561
// BigInt literal with digits grouped by thousand.
let n4 = 155_326_458_156_248_168_514n
console.log(n4); // This will print: 155326458156248168514n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment