Merge pull request #1079 from K-Sato1995/patch-5

Better punctuation
This commit is contained in:
Ilya Kantor 2019-06-25 12:51:08 +03:00 committed by GitHub
commit 2fad19d533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,7 +12,7 @@ Imagine we need to write 1 billion. The obvious way is:
let billion = 1000000000; let billion = 1000000000;
``` ```
But in real life we usually avoid writing a long string of zeroes as it's easy to mistype. Also, we are lazy. We will usually write something like `"1bn"` for a billion or `"7.3bn"` for 7 billion 300 million. The same is true for most large numbers. But in real life, we usually avoid writing a long string of zeroes as it's easy to mistype. Also, we are lazy. We will usually write something like `"1bn"` for a billion or `"7.3bn"` for 7 billion 300 million. The same is true for most large numbers.
In JavaScript, we shorten a number by appending the letter `"e"` to the number and specifying the zeroes count: In JavaScript, we shorten a number by appending the letter `"e"` to the number and specifying the zeroes count: