From 98e7e6bf238aee111aa013900db2aee46aa30f4f Mon Sep 17 00:00:00 2001 From: Omer Baddour <36576544+OmerBaddour@users.noreply.github.com> Date: Thu, 12 May 2022 10:47:32 -0400 Subject: [PATCH 1/2] minor fixes --- 1-js/05-data-types/02-number/article.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/1-js/05-data-types/02-number/article.md b/1-js/05-data-types/02-number/article.md index 0e7c8b6c..0117c0de 100644 --- a/1-js/05-data-types/02-number/article.md +++ b/1-js/05-data-types/02-number/article.md @@ -4,7 +4,7 @@ In modern JavaScript, there are two types of numbers: 1. Regular numbers in JavaScript are stored in 64-bit format [IEEE-754](https://en.wikipedia.org/wiki/IEEE_754-2008_revision), also known as "double precision floating point numbers". These are numbers that we're using most of the time, and we'll talk about them in this chapter. -2. BigInt numbers, to represent integers of arbitrary length. They are sometimes needed, because a regular number can't safely exceed 253 or be less than -253. As bigints are used in few special areas, we devote them a special chapter . +2. BigInt numbers represent integers of arbitrary length. They are sometimes needed because a regular number can't safely exceed 253 or be less than -253. As bigints are used in few special areas, we devote them a special chapter . So here we'll talk about regular numbers. Let's expand our knowledge of them. @@ -305,7 +305,7 @@ They belong to the type `number`, but are not "normal" numbers, so there are spe alert( isNaN("str") ); // true ``` - But do we need this function? Can't we just use the comparison `=== NaN`? Sorry, but the answer is no. The value `NaN` is unique in that it does not equal anything, including itself: + But do we need this function? Can't we just use the comparison `=== NaN`? Unfortunately not. The value `NaN` is unique in that it does not equal anything, including itself: ```js run alert( NaN === NaN ); // false @@ -399,7 +399,7 @@ A few examples: alert( Math.random() ); // ... (any random numbers) ``` -`Math.max(a, b, c...)` / `Math.min(a, b, c...)` +`Math.max(a, b, c...)` and `Math.min(a, b, c...)` : Returns the greatest/smallest from the arbitrary number of arguments. ```js run From 576005b3365fe7309eebf1cb0132f510ac86eb81 Mon Sep 17 00:00:00 2001 From: Omer Baddour <36576544+OmerBaddour@users.noreply.github.com> Date: Fri, 13 May 2022 09:28:25 -0400 Subject: [PATCH 2/2] minor fixes --- 1-js/05-data-types/04-array/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/05-data-types/04-array/article.md b/1-js/05-data-types/04-array/article.md index 7ccf5d4e..36654610 100644 --- a/1-js/05-data-types/04-array/article.md +++ b/1-js/05-data-types/04-array/article.md @@ -96,7 +96,7 @@ The "trailing comma" style makes it easier to insert/remove items, because all l [recent browser="new"] -Let's say we want a last element of the array. +Let's say we want the last element of the array. Some programming languages allow to use negative indexes for the same purpose, like `fruits[-1]`. @@ -403,7 +403,7 @@ It's rarely used, because square brackets `[]` are shorter. Also there's a trick If `new Array` is called with a single argument which is a number, then it creates an array *without items, but with the given length*. -Let's see how one can shoot themself in the foot: +Let's see how one can shoot themselves in the foot: ```js run let arr = new Array(2); // will it create an array of [2] ?