en.javascript.info
en.javascript.info copied to clipboard
Clarification of the example in the article
incorrect revision. the numbers are in reference to the exponent, not the coefficient.
(vote to close)
perhaps could clarify for beginners:
// the exponent -3 divides by 1 with 3 zeroes, here with coefficient 1
1e-3 === 1 / 1000; // 0.001
// the exponent -6 divides by 1 with 6 zeroes, here with coefficient 1.23
1.23e-6 === 1.23 / 1000000; // 0.00000123
Matbe concise // exponent -3 means dividing by 1 with 3 zeroes
@shallow-beach, @joaquinelio, thanks for your comments, I've made some changes (hope now it will be clearer for beginners). Please take a look and approve if everything's alright.