From aaa2a0dc9b50882dbf5d0df00f4efd7d803c2b51 Mon Sep 17 00:00:00 2001 From: Brent Guffens Date: Mon, 5 Feb 2018 13:47:07 +0100 Subject: [PATCH 01/11] Language improvements, clarifications --- 2-ui/1-document/03-dom-navigation/article.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/2-ui/1-document/03-dom-navigation/article.md b/2-ui/1-document/03-dom-navigation/article.md index b58f15fe..0578d14d 100644 --- a/2-ui/1-document/03-dom-navigation/article.md +++ b/2-ui/1-document/03-dom-navigation/article.md @@ -7,9 +7,9 @@ libs: # Walking the DOM -DOM allows to do anything with elements and their contents, but first we need to reach the corresponding DOM object, get it into a variable, and then we are able to modify it. +The DOM allows to do anything with elements and their contents, but first we need to reach the corresponding DOM object, get it into a variable, and then we are able to modify it. -All operations on DOM start with the `document` object. From it we can access any node. +All operations on the DOM start with the `document` object. From it we can access any node. [cut] @@ -275,7 +275,7 @@ Certain types of DOM elements may provide additional properties, specific to the Tables are a great example and important particular case of that. -**``** element supports (in addition to the given above) these properties: +**The `
`** element supports (in addition to the given above) these properties: - `table.rows` -- the collection of `` elements of the table. - `table.caption/tHead/tFoot` -- references to elements ``, ``. - `table.tBodies` -- the collection of `` elements (can be many according to the standard). @@ -285,8 +285,8 @@ Tables are a great example and important particular case of that. **``:** - `tr.cells` -- the collection of ``. -- `tr.sectionRowIndex` -- the number of the given `` inside the enclosing `/`. -- `tr.rowIndex` -- the number of the `` in the table. +- `tr.sectionRowIndex` -- the position (index) of the given `` inside the enclosing `//`. +- `tr.rowIndex` -- the number of the `` in the table as a whole (including all table rows). **``. From d5fedd315e9613d0aca2a05d84f36884b5f3a2ce Mon Sep 17 00:00:00 2001 From: Mauro Zenoni <25953912+maurozenoni@users.noreply.github.com> Date: Mon, 2 Apr 2018 22:00:08 +0200 Subject: [PATCH 02/11] Rewording of the second task in Promise Chaining. --- 6-async/03-promise-chaining/02-error-async/task.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/6-async/03-promise-chaining/02-error-async/task.md b/6-async/03-promise-chaining/02-error-async/task.md index f3fdf62b..bafc47ce 100644 --- a/6-async/03-promise-chaining/02-error-async/task.md +++ b/6-async/03-promise-chaining/02-error-async/task.md @@ -1,6 +1,6 @@ # Error in setTimeout -How do you think, does the `.catch` trigger? Explain your answer? +What do you think? Will the `.catch` trigger? Explain your answer. ```js new Promise(function(resolve, reject) { From dea088d3f9601e8cf620d7604b0f4630d25b0785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1oriander?= <36999873+carbonid1@users.noreply.github.com> Date: Fri, 6 Apr 2018 19:04:11 +0300 Subject: [PATCH 03/11] Update article.md "Passing it "as it" won't work". I suppose u meant: "Passing it "as IS" won't work". --- .../02-rest-parameters-spread-operator/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md b/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md index f1c099a3..c2305707 100644 --- a/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md +++ b/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md @@ -135,7 +135,7 @@ alert( Math.max(3, 5, 1) ); // 5 Now let's say we have an array `[3, 5, 1]`. How do we call `Math.max` with it? -Passing it "as it" won't work, because `Math.max` expects a list of numeric arguments, not a single array: +Passing it "as is" won't work, because `Math.max` expects a list of numeric arguments, not a single array: ```js run let arr = [3, 5, 1]; From 6c800d71ca4cd7d6adbd2278ec11afc0d2ca8606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1oriander?= <36999873+carbonid1@users.noreply.github.com> Date: Fri, 6 Apr 2018 19:15:00 +0300 Subject: [PATCH 04/11] Corrected a few mistakes in English. As far as I know, the first letter in the word "European"/days of the week should be capitalized. --- 1-js/05-data-types/10-date/3-weekday/task.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/05-data-types/10-date/3-weekday/task.md b/1-js/05-data-types/10-date/3-weekday/task.md index c2ae2168..ba62790c 100644 --- a/1-js/05-data-types/10-date/3-weekday/task.md +++ b/1-js/05-data-types/10-date/3-weekday/task.md @@ -4,7 +4,7 @@ importance: 5 # European weekday -European countries have days of week starting with monday (number 1), then tuesday (number 2) and till sunday (number 7). Write a function `getLocalDay(date)` that returns the "european" day of week for `date`. +European countries have days of week starting with Monday (number 1), then Tuesday (number 2) and till Sunday (number 7). Write a function `getLocalDay(date)` that returns the "European" day of week for `date`. ```js no-beautify let date = new Date(2012, 0, 3); // 3 Jan 2012 From 8edfab513f03672b9955af5200ba62d95338719a Mon Sep 17 00:00:00 2001 From: AGCB Date: Thu, 12 Apr 2018 16:51:50 -0700 Subject: [PATCH 05/11] grammar fix --- 2-ui/2-events/03-event-delegation/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/2-events/03-event-delegation/article.md b/2-ui/2-events/03-event-delegation/article.md index 16d9dc71..83b4b6ce 100644 --- a/2-ui/2-events/03-event-delegation/article.md +++ b/2-ui/2-events/03-event-delegation/article.md @@ -1,7 +1,7 @@ # Event delegation -Capturing and bubbling allow to implement one of most powerful event handling patterns called *event delegation*. +Capturing and bubbling allow us to implement one of most powerful event handling patterns called *event delegation*. The idea is that if we have a lot of elements handled in a similar way, then instead of assigning a handler to each of them -- we put a single handler on their common ancestor. From 45ce771ea8ff6c6316ff087fff0298aa89d3841e Mon Sep 17 00:00:00 2001 From: Mike Gowen Date: Sat, 21 Apr 2018 22:22:50 -0700 Subject: [PATCH 06/11] Fix error in pow task solution --- 1-js/02-first-steps/14-function-basics/4-pow/solution.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/14-function-basics/4-pow/solution.md b/1-js/02-first-steps/14-function-basics/4-pow/solution.md index 79eb2b44..5ef20c38 100644 --- a/1-js/02-first-steps/14-function-basics/4-pow/solution.md +++ b/1-js/02-first-steps/14-function-basics/4-pow/solution.md @@ -13,7 +13,7 @@ function pow(x, n) { let x = prompt("x?", ''); let n = prompt("n?", ''); -if (n <= 1) { +if (n < 1) { alert(`Power ${n} is not supported, use an integer greater than 0`); } else { From af3a177011bc4c0428c5fba1e5779fa4ef35c286 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Tue, 24 Apr 2018 15:14:08 -0700 Subject: [PATCH 07/11] Update room.number to correspond to other usages --- 1-js/05-data-types/11-json/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/05-data-types/11-json/article.md b/1-js/05-data-types/11-json/article.md index a23bf583..174b2b7f 100644 --- a/1-js/05-data-types/11-json/article.md +++ b/1-js/05-data-types/11-json/article.md @@ -131,7 +131,7 @@ let meetup = { title: "Conference", *!* room: { - number: 123, + number: 23, participants: ["john", "ann"] } */!* From 3d4ad8ff51d1c695eb33cb42addabce500770546 Mon Sep 17 00:00:00 2001 From: Mikhail Vasin Date: Tue, 1 May 2018 23:42:26 +0300 Subject: [PATCH 08/11] Fix a misused word --- 2-ui/1-document/11-coordinates/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2-ui/1-document/11-coordinates/article.md b/2-ui/1-document/11-coordinates/article.md index 919db9f4..35ba15e1 100644 --- a/2-ui/1-document/11-coordinates/article.md +++ b/2-ui/1-document/11-coordinates/article.md @@ -55,7 +55,7 @@ If we compare window coordinates versus CSS positioning, then there are obvious But in CSS the `right` property means the distance from the right edge, and the `bottom` -- from the bottom edge. -If we just look at the picture below, we can see that in JavaScript it is not so. All window coordinates are counted from the upper-left corner, including these ones. +If we just look at the picture above, we can see that in JavaScript it is not so. All window coordinates are counted from the upper-left corner, including these ones. ``` ## elementFromPoint(x, y) [#elementFromPoint] From c42a4a749a5113f29c7de34ccc7ef7b86cc8c511 Mon Sep 17 00:00:00 2001 From: Bardia Rastin Date: Tue, 8 May 2018 02:41:04 +0430 Subject: [PATCH 09/11] fix a small mistake in calling Math.max --- .../02-rest-parameters-spread-operator/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md b/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md index f1c099a3..fa8c9f1c 100644 --- a/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md +++ b/1-js/06-advanced-functions/02-rest-parameters-spread-operator/article.md @@ -145,7 +145,7 @@ alert( Math.max(arr) ); // NaN */!* ``` -And surely we can't manually list items in the code `Math.max(arg[0], arg[1], arg[2])`, because we may be unsure how many there are. As our script executes, there could be a lot, or there could be none. And that would get ugly. +And surely we can't manually list items in the code `Math.max(arr[0], arr[1], arr[2])`, because we may be unsure how many there are. As our script executes, there could be a lot, or there could be none. And that would get ugly. *Spread operator* to the rescue! It looks similar to rest parameters, also using `...`, but does quite the opposite. From 68795098a3988889116dd4d8d2e1c2c38588a6df Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Tue, 5 Jun 2018 19:45:17 +0300 Subject: [PATCH 10/11] Update test.js --- 1-js/05-data-types/03-string/3-truncate/_js.view/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/05-data-types/03-string/3-truncate/_js.view/test.js b/1-js/05-data-types/03-string/3-truncate/_js.view/test.js index c252f16b..99149233 100644 --- a/1-js/05-data-types/03-string/3-truncate/_js.view/test.js +++ b/1-js/05-data-types/03-string/3-truncate/_js.view/test.js @@ -1,5 +1,5 @@ describe("truncate", function() { - it("truncate the long string to the given lenth (including the ellipsis)", function() { + it("truncate the long string to the given length (including the ellipsis)", function() { assert.equal( truncate("What I'd like to tell on this topic is:", 20), "What I'd like to te…" @@ -13,4 +13,4 @@ describe("truncate", function() { ); }); -}); \ No newline at end of file +}); From d8d50868ea590ecba891563a954d104c144bcdb5 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Thu, 7 Jun 2018 18:07:19 +0300 Subject: [PATCH 11/11] minor --- 1-js/02-first-steps/14-function-basics/4-pow/task.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/14-function-basics/4-pow/task.md b/1-js/02-first-steps/14-function-basics/4-pow/task.md index e4f885a5..f569320c 100644 --- a/1-js/02-first-steps/14-function-basics/4-pow/task.md +++ b/1-js/02-first-steps/14-function-basics/4-pow/task.md @@ -9,7 +9,7 @@ Write a function `pow(x,n)` that returns `x` in power `n`. Or, in other words, m ```js pow(3, 2) = 3 * 3 = 9 pow(3, 3) = 3 * 3 * 3 = 27 -pow(1, 100) = 1 * 1 * ...*1 = 1 +pow(1, 100) = 1 * 1 * ...* 1 = 1 ``` Create a web-page that prompts for `x` and `n`, and then shows the result of `pow(x,n)`.
`, `
` and `` cells inside the given `
` and ``:** - `td.cellIndex` -- the number of the cell inside the enclosing `