Skip to content

Content bug: Misleading code on is JS property page #2966

@talktohebe

Description

@talktohebe

What page(s) did you find the problem on?

page URL: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is

Specific page section or heading?

in the 'Examples' section,there is a piece of code"const n = 15; Object.is(0n, -0n); // false".
This is misleading。“const n = 15” is useless, “0n” means bigint , not a constant. delete it will be better.

What is the problem?

“const n = 15” s misleading.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions