. Read it when you need such big numbers.
-
-```smart header="Compatibility issues"
-Right now, `BigInt` is supported in Firefox/Chrome/Edge/Safari, but not in IE.
-```
-
-You can check [*MDN* BigInt compatibility table](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt#Browser_compatibility) to know which versions of a browser are supported.
-
## String
A string in JavaScript must be surrounded by quotes.
From 5a0df77a9a45b81b86324d3b5573a9b3c7eab5d9 Mon Sep 17 00:00:00 2001
From: shallow-beach <96891913+shallow-beach@users.noreply.github.com>
Date: Wed, 10 Jul 2024 01:43:17 -0700
Subject: [PATCH 15/21] Update article.md
detail `Math.round` behavior on negative numbers in middle case.
---
1-js/05-data-types/02-number/article.md | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/1-js/05-data-types/02-number/article.md b/1-js/05-data-types/02-number/article.md
index a96e4e688..96a7b622a 100644
--- a/1-js/05-data-types/02-number/article.md
+++ b/1-js/05-data-types/02-number/article.md
@@ -137,7 +137,7 @@ There are several built-in functions for rounding:
: Rounds up: `3.1` becomes `4`, and `-1.1` becomes `-1`.
`Math.round`
-: Rounds to the nearest integer: `3.1` becomes `3`, `3.6` becomes `4`, the middle case: `3.5` rounds up to `4` too.
+: Rounds to the nearest integer: `3.1` becomes `3`, `3.6` becomes `4`. In the middle cases `3.5` rounds up to `4`, and `-3.5` rounds up to `-3`.
`Math.trunc` (not supported by Internet Explorer)
: Removes anything after the decimal point without rounding: `3.1` becomes `3`, `-1.1` becomes `-1`.
@@ -147,8 +147,10 @@ Here's the table to summarize the differences between them:
| | `Math.floor` | `Math.ceil` | `Math.round` | `Math.trunc` |
|---|---------|--------|---------|---------|
|`3.1`| `3` | `4` | `3` | `3` |
+|`3.5`| `3` | `4` | `4` | `3` |
|`3.6`| `3` | `4` | `4` | `3` |
|`-1.1`| `-2` | `-1` | `-1` | `-1` |
+|`-1.5`| `-2` | `-1` | `-1` | `-1` |
|`-1.6`| `-2` | `-1` | `-2` | `-1` |
From 6f08958b99c6e63417d5c480fc5f0384c502b79d Mon Sep 17 00:00:00 2001
From: tonybishnoi <53338071+tonybishnoi@users.noreply.github.com>
Date: Thu, 10 Oct 2024 01:55:56 +0530
Subject: [PATCH 16/21] minor fix to function name written in explanation
The code uses the function named 'askPassword' but the text above it explaining the error reason says 'ask' instead of 'askPassword'
---
.../10-bind/5-question-use-bind/solution.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/1-js/06-advanced-functions/10-bind/5-question-use-bind/solution.md b/1-js/06-advanced-functions/10-bind/5-question-use-bind/solution.md
index 403107ca6..4a381c0b4 100644
--- a/1-js/06-advanced-functions/10-bind/5-question-use-bind/solution.md
+++ b/1-js/06-advanced-functions/10-bind/5-question-use-bind/solution.md
@@ -1,5 +1,5 @@
-The error occurs because `ask` gets functions `loginOk/loginFail` without the object.
+The error occurs because `askPassword` gets functions `loginOk/loginFail` without the object.
When it calls them, they naturally assume `this=undefined`.
From eedc262cea1ba991c067e4bc794592121b5aa9e2 Mon Sep 17 00:00:00 2001
From: Nick Roma <54879724+nikoandpiko@users.noreply.github.com>
Date: Wed, 23 Oct 2024 00:45:18 +0900
Subject: [PATCH 17/21] Grammatical fix
---
1-js/03-code-quality/06-polyfills/article.md | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/1-js/03-code-quality/06-polyfills/article.md b/1-js/03-code-quality/06-polyfills/article.md
index 19404b7b5..b6ea60820 100644
--- a/1-js/03-code-quality/06-polyfills/article.md
+++ b/1-js/03-code-quality/06-polyfills/article.md
@@ -71,9 +71,7 @@ if (!Math.trunc) { // if no such function
JavaScript is a highly dynamic language. Scripts may add/modify any function, even built-in ones.
-Two interesting polyfill libraries are:
-- [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features.
-
+One interesting polyfill library is [core-js](https://github.com/zloirock/core-js), which supports a wide range of features and allows you to include only the specific ones you need.
## Summary
From 67833c9ccf241d5d7bbe4f678da1f6541cf163c1 Mon Sep 17 00:00:00 2001
From: zakingslayerv22 <11926638+zakingslayerv22@users.noreply.github.com>
Date: Wed, 11 Dec 2024 02:05:05 -0800
Subject: [PATCH 18/21] Update article.md
Suggested edit - to make the phrase clearer.
---
1-js/11-async/02-promise-basics/article.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/1-js/11-async/02-promise-basics/article.md b/1-js/11-async/02-promise-basics/article.md
index b15643f0a..66d9538fc 100644
--- a/1-js/11-async/02-promise-basics/article.md
+++ b/1-js/11-async/02-promise-basics/article.md
@@ -222,7 +222,7 @@ The idea of `finally` is to set up a handler for performing cleanup/finalizing a
E.g. stopping loading indicators, closing no longer needed connections, etc.
-Think of it as a party finisher. No matter was a party good or bad, how many friends were in it, we still need (or at least should) do a cleanup after it.
+Think of it as a party finisher. Irresepective of whether a party was good or bad, how many friends were in it, we still need (or at least should) do a cleanup after it.
The code may look like this:
From b36823a929a10675eebc2f62d2a680a1cbcc8d63 Mon Sep 17 00:00:00 2001
From: pj-szdm <50366990+pj-szdm@users.noreply.github.com>
Date: Wed, 18 Dec 2024 10:34:02 +0100
Subject: [PATCH 19/21] better wording
---
1-js/05-data-types/02-number/article.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/1-js/05-data-types/02-number/article.md b/1-js/05-data-types/02-number/article.md
index 96a7b622a..8e41f673d 100644
--- a/1-js/05-data-types/02-number/article.md
+++ b/1-js/05-data-types/02-number/article.md
@@ -118,7 +118,7 @@ Common use cases for this are:
```warn header="Two dots to call a method"
Please note that two dots in `123456..toString(36)` is not a typo. If we want to call a method directly on a number, like `toString` in the example above, then we need to place two dots `..` after it.
-If we placed a single dot: `123456.toString(36)`, then there would be an error, because JavaScript syntax implies the decimal part after the first dot. And if we place one more dot, then JavaScript knows that the decimal part is empty and now goes the method.
+If we placed a single dot: `123456.toString(36)`, then there would be an error, because JavaScript syntax implies the decimal part after the first dot. And if we place one more dot, then JavaScript knows that the decimal part is empty and now uses the method.
Also could write `(123456).toString(36)`.
From dc1437872bc789e3ad3ba6a36bf3a845a0f43041 Mon Sep 17 00:00:00 2001
From: mhi1627 <168352351+mhi1627@users.noreply.github.com>
Date: Wed, 22 Jan 2025 16:37:56 +0530
Subject: [PATCH 20/21] Update article.md
the comment number is missing when the we mention line 2
---
1-js/02-first-steps/16-function-expressions/article.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/1-js/02-first-steps/16-function-expressions/article.md b/1-js/02-first-steps/16-function-expressions/article.md
index b952d5943..c6dd891bd 100644
--- a/1-js/02-first-steps/16-function-expressions/article.md
+++ b/1-js/02-first-steps/16-function-expressions/article.md
@@ -82,7 +82,7 @@ let sayHi = function() { // (1) create
alert( "Hello" );
};
-let func = sayHi;
+let func = sayHi; //(2)
// ...
```
From 8b2a2f2c1c6d888f811cb0a2aa7b47eb2797b2d6 Mon Sep 17 00:00:00 2001
From: Aditya Girdhar <92713380+AdityaGirdhar@users.noreply.github.com>
Date: Thu, 30 Jan 2025 20:39:38 +0530
Subject: [PATCH 21/21] Improve readability
---
1-js/03-code-quality/06-polyfills/article.md | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/1-js/03-code-quality/06-polyfills/article.md b/1-js/03-code-quality/06-polyfills/article.md
index 19404b7b5..aa849d407 100644
--- a/1-js/03-code-quality/06-polyfills/article.md
+++ b/1-js/03-code-quality/06-polyfills/article.md
@@ -71,8 +71,7 @@ if (!Math.trunc) { // if no such function
JavaScript is a highly dynamic language. Scripts may add/modify any function, even built-in ones.
-Two interesting polyfill libraries are:
-- [core js](https://github.com/zloirock/core-js) that supports a lot, allows to include only needed features.
+An interesting polyfill library is [core js](https://github.com/zloirock/core-js) that supports a lot and allows to include only needed features.
## Summary
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy