From 99a79cd485406b1b4ab52d84158b8e674e0ad2dc Mon Sep 17 00:00:00 2001 From: kerwitz Date: Wed, 14 Jun 2017 21:20:24 +0200 Subject: [PATCH] Fixed wording in /number. --- docs/number/parse-string.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/number/parse-string.md b/docs/number/parse-string.md index 4eeeba1..482f159 100644 --- a/docs/number/parse-string.md +++ b/docs/number/parse-string.md @@ -1,6 +1,6 @@ # Parsing String -There is a lot of ways to convert a `String` into a `Number`: +There are lots of ways to convert a `String` into a `Number`: |                     | `'1000'` | `'10.9'` | `'1,000.9'` | `'011'` | `'10c'` | `'$10'` | |---------------------|----------|----------|-------------|---------|---------|---------| @@ -14,15 +14,15 @@ There is a lot of ways to convert a `String` into a `Number`: | `num - 0`           | 1000   | 10.9   | NaN       | 11   | NaN   | NaN   | | `+num`             | 1000   | 10.9   | NaN       | 11   | NaN   | NaN   | -Despite the differences of the results, it does not matter too much the method used in terms of perfomance. +Despite the differences of the results, it does not matter too much which method you use in terms of performance. -`+num` is the shortest way and probably used in JavaScript minification tools. +`+num` is the shortest way and is often used in JavaScript minification tools. Use `Number(num)` constructor should be enough evidence of your intention. If you want to use one of the tricky ways, keep in mind that the intention is not always obvious. -A solution could be wrap them into a named function: +A solution could be to wrap them into a named function: ```js const toNumber = num => +num