Closed Bug 1219404 Opened 10 years ago Closed 10 years ago

Incorrect exponent example in Arithmetic operators section on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Expressions_and_Operators

Categories

(Developer Documentation Graveyard :: JavaScript, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: levi.delissa, Unassigned)

References

()

Details

:: Developer Documentation Request Request Type: Correction Gecko Version: unspecified Technical Contact: :: Details The examples for exponential operator are: 2 ** 3 returns 8. 10 ** -1 returns -1. However according to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Exponentiation 10 ** -1 should return 0.1
Seems to me that the example given in the page is correct. 10 ** -1 == Math.pow(10, -1) == 0.1
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Oh yeah. I had missed the Guide URL. Fixed now. Thanks for reporting :)
Resolution: INVALID → FIXED
You need to log in before you can comment on or make changes to this bug.