Skip to main content
Post Closed as "Duplicate" by cottontail, General Grievance, Karl Knechtel, Dave, pppery
Fix type capitalization
Source Link
zcoop98
  • 3.1k
  • 3
  • 37
  • 66

1n is a BigintBigInt literal in JavaScript. BigintsBigInts currently display incorrectly/ don't display at all in the Stack Snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null] instead of correctly displaying the BigintBigInt values 1n and [1n].

Compared to an actual browser console, which logs the BigintBigInt value correctly both as-is and in an array:

Screenshot of two lines of browser console output showing "1n" on line 1 and "[1n]" on line 2

Example Snippet:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

1n is a Bigint literal in JavaScript. Bigints currently display incorrectly/ don't display at all in the Stack Snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null] instead of correctly displaying the Bigint values 1n and [1n].

Compared to an actual browser console, which logs the Bigint value correctly both as-is and in an array:

Screenshot of two lines of browser console output showing "1n" on line 1 and "[1n]" on line 2

Example Snippet:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

1n is a BigInt literal in JavaScript. BigInts currently display incorrectly/ don't display at all in the Stack Snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null] instead of correctly displaying the BigInt values 1n and [1n].

Compared to an actual browser console, which logs the BigInt value correctly both as-is and in an array:

Screenshot of two lines of browser console output showing "1n" on line 1 and "[1n]" on line 2

Example Snippet:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

Beef up the body text with desired output and example, remove "correctly" from title since it's slightly misleading (Bigints fail to display at all)
Source Link
zcoop98
  • 3.1k
  • 3
  • 37
  • 66

Stack Snippets console doesn't display JS BigInts correctly

1n is a bigintBigint literal in JavaScript. Bigints currently display incorrectly/ don't display at all in the stack snippetStack Snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null] instead of correctly displaying the Bigint values 1n and [1n].

Compared to an actual browser console, which logs the Bigint value correctly both as-is and in an array:

Screenshot of two lines of browser console output showing "1n" on line 1 and "[1n]" on line 2

Example Snippet:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

Stack Snippets console doesn't display JS BigInts correctly

1n is a bigint literal in JavaScript. Bigints currently display incorrectly in the stack snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null].

Example:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

Stack Snippets console doesn't display JS BigInts

1n is a Bigint literal in JavaScript. Bigints currently display incorrectly/ don't display at all in the Stack Snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null] instead of correctly displaying the Bigint values 1n and [1n].

Compared to an actual browser console, which logs the Bigint value correctly both as-is and in an array:

Screenshot of two lines of browser console output showing "1n" on line 1 and "[1n]" on line 2

Example Snippet:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

Make title more concise, bring description text from title into body
Source Link
zcoop98
  • 3.1k
  • 3
  • 37
  • 66

JS BigInt — stack snippet console.log(1n) logs nothing; Stack Snippets console.log([1n]) logs [null] doesn't display JS BigInts correctly

1n is a bigint literal in JavaScript. Bigints currently display incorrectly in the stack snippet consoleconsole; console.log(1n) logs nothing and console.log([1n]) logs [null].

Example:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

JS BigInt — stack snippet console.log(1n) logs nothing; console.log([1n]) logs [null]

1n is a bigint literal in JavaScript. Bigints currently display incorrectly in the stack snippet console.

Example:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

Stack Snippets console doesn't display JS BigInts correctly

1n is a bigint literal in JavaScript. Bigints currently display incorrectly in the stack snippet console; console.log(1n) logs nothing and console.log([1n]) logs [null].

Example:

console.log(1n) // logs nothing
console.log([1n]) // logs [null]

Source Link
Lionel Rowe
  • 5.9k
  • 7
  • 4
Loading