From a78e9d5d2fcc7f821b06c93d2ec8b3e49258abb5 Mon Sep 17 00:00:00 2001 From: romanstetsyk <25715951+romanstetsyk@users.noreply.github.com> Date: Sat, 1 Oct 2022 19:24:44 +0100 Subject: [PATCH 1/9] Change potentially confusing statement --- 1-js/06-advanced-functions/08-settimeout-setinterval/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/06-advanced-functions/08-settimeout-setinterval/article.md b/1-js/06-advanced-functions/08-settimeout-setinterval/article.md index 5a40238b1..f5e0e3b49 100644 --- a/1-js/06-advanced-functions/08-settimeout-setinterval/article.md +++ b/1-js/06-advanced-functions/08-settimeout-setinterval/article.md @@ -218,7 +218,7 @@ And here is the picture for the nested `setTimeout`: ![](settimeout-interval.svg) -**The nested `setTimeout` guarantees the fixed delay (here 100ms).** +**The nested `setTimeout` ensures a minimum delay (100ms here) between the end of one call and the beginning of the subsequent one.** That's because a new call is planned at the end of the previous one. From 8c256ae569fc496ff28d3f73daf81f3622a6115b Mon Sep 17 00:00:00 2001 From: Nikolai Chernolutskii <93830967+nikolai-chernolutskii@users.noreply.github.com> Date: Sun, 29 Jan 2023 18:47:02 +0200 Subject: [PATCH 2/9] Update article.md Assign to anything at the left-side => Assign to anything on the left-side Need to be consistent - the previous menu item title reads "Works with any iterable on the right-side" --- 1-js/05-data-types/10-destructuring-assignment/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/05-data-types/10-destructuring-assignment/article.md b/1-js/05-data-types/10-destructuring-assignment/article.md index 41e36db2c..06886eee0 100644 --- a/1-js/05-data-types/10-destructuring-assignment/article.md +++ b/1-js/05-data-types/10-destructuring-assignment/article.md @@ -80,7 +80,7 @@ That works, because internally a destructuring assignment works by iterating ove ```` -````smart header="Assign to anything at the left-side" +````smart header="Assign to anything on the left-side" We can use any "assignables" on the left side. For instance, an object property: From 9a90dc19c865c89c6e02d6e04f541de6776ef7e9 Mon Sep 17 00:00:00 2001 From: Scott Wright <108872957+scottwright-io@users.noreply.github.com> Date: Tue, 31 Jan 2023 16:29:26 +0000 Subject: [PATCH 3/9] Fix typo Missing an 'a' from this sentence. --- 1-js/02-first-steps/08-operators/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/08-operators/article.md b/1-js/02-first-steps/08-operators/article.md index d52c37a17..0c1663619 100644 --- a/1-js/02-first-steps/08-operators/article.md +++ b/1-js/02-first-steps/08-operators/article.md @@ -266,7 +266,7 @@ alert( c ); // 4 Chained assignments evaluate from right to left. First, the rightmost expression `2 + 2` is evaluated and then assigned to the variables on the left: `c`, `b` and `a`. At the end, all the variables share a single value. -Once again, for the purposes of readability it's better to split such code into few lines: +Once again, for the purposes of readability it's better to split such code into a few lines: ```js c = 2 + 2; From 55269bb3bb115aa2829334652292f521d8b5b6f1 Mon Sep 17 00:00:00 2001 From: winst Date: Thu, 2 Mar 2023 18:23:39 -0500 Subject: [PATCH 4/9] Update grammar --- 1-js/02-first-steps/04-variables/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/02-first-steps/04-variables/article.md b/1-js/02-first-steps/04-variables/article.md index ec6c3a1c6..0c1e29567 100644 --- a/1-js/02-first-steps/04-variables/article.md +++ b/1-js/02-first-steps/04-variables/article.md @@ -172,7 +172,7 @@ let userName; let test123; ``` -When the name contains multiple words, [camelCase](https://en.wikipedia.org/wiki/CamelCase) is commonly used. That is: words go one after another, each word except first starting with a capital letter: `myVeryLongName`. +When the name contains multiple words, [camelCase](https://en.wikipedia.org/wiki/CamelCase) is commonly used. That is: words go one after another, with each word except the first starting with a capital letter: `myVeryLongName`. What's interesting -- the dollar sign `'$'` and the underscore `'_'` can also be used in names. They are regular symbols, just like letters, without any special meaning. From c07df985f1466751eff45c881c3ac5460dcbdb22 Mon Sep 17 00:00:00 2001 From: Travis Briggs Date: Mon, 22 Jul 2024 18:57:50 -0700 Subject: [PATCH 5/9] Update article.md Remove non-inclusive language. --- 1-js/01-getting-started/1-intro/article.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/1-js/01-getting-started/1-intro/article.md b/1-js/01-getting-started/1-intro/article.md index 2f4f518f3..a58d5d725 100644 --- a/1-js/01-getting-started/1-intro/article.md +++ b/1-js/01-getting-started/1-intro/article.md @@ -73,7 +73,7 @@ Examples of such restrictions include: This is called the "Same Origin Policy". To work around that, *both pages* must agree for data exchange and must contain special JavaScript code that handles it. We'll cover that in the tutorial. This limitation is, again, for the user's safety. A page from `http://anysite.com` which a user has opened must not be able to access another browser tab with the URL `http://gmail.com`, for example, and steal information from there. -- JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation. +- JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is severely limited. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's a safety limitation. ![](limitations.svg) From 87bfe5b6bc7a96415974736c21b87384da0fb829 Mon Sep 17 00:00:00 2001 From: swapnasahoo Date: Tue, 17 Feb 2026 15:32:59 +0530 Subject: [PATCH 6/9] docs: replace figure brackets with curly braces across all occurrences --- .../02-coding-style/1-style-errors/solution.md | 4 ++-- 1-js/04-object-basics/01-object/article.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md b/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md index 4facc8b29..93c1947ca 100644 --- a/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md +++ b/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md @@ -3,7 +3,7 @@ You could note the following: ```js no-beautify function pow(x,n) // <- no space between arguments -{ // <- figure bracket on a separate line +{ // <- curly braces on a separate line let result=1; // <- no spaces before or after = for(let i=0;i, there are eight data types in JavaScri In contrast, objects are used to store keyed collections of various data and more complex entities. In JavaScript, objects penetrate almost every aspect of the language. So we must understand them first before going in-depth anywhere else. -An object can be created with figure brackets `{…}` with an optional list of *properties*. A property is a "key: value" pair, where `key` is a string (also called a "property name"), and `value` can be anything. +An object can be created with curly braces `{…}` with an optional list of *properties*. A property is a "key: value" pair, where `key` is a string (also called a "property name"), and `value` can be anything. We can imagine an object as a cabinet with signed files. Every piece of data is stored in its file by the key. It's easy to find a file by its name or add/remove a file. @@ -20,7 +20,7 @@ let user = {}; // "object literal" syntax ![](object-user-empty.svg) -Usually, the figure brackets `{...}` are used. That declaration is called an *object literal*. +Usually, the curly braces `{...}` are used. That declaration is called an *object literal*. ## Literals and properties From 953c2dbf45e5dfa40a9b78d39ffbf9bd7320d380 Mon Sep 17 00:00:00 2001 From: "Stanislav (Stanley) Modrak" <44023416+smith558@users.noreply.github.com> Date: Thu, 26 Feb 2026 10:25:28 +0000 Subject: [PATCH 7/9] Improve coding style --- .../02-coding-style/1-style-errors/solution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md b/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md index 93c1947ca..31b3bb7ae 100644 --- a/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md +++ b/1-js/03-code-quality/02-coding-style/1-style-errors/solution.md @@ -3,7 +3,7 @@ You could note the following: ```js no-beautify function pow(x,n) // <- no space between arguments -{ // <- curly braces on a separate line +{ // <- curly brace on a separate line let result=1; // <- no spaces before or after = for(let i=0;i Date: Sat, 4 Jul 2026 15:36:41 +0530 Subject: [PATCH 8/9] Convert prompt inputs to numbers with unary plus Added unary plus to prompt inputs for type conversion. --- 1-js/02-first-steps/15-function-basics/4-pow/solution.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/15-function-basics/4-pow/solution.md b/1-js/02-first-steps/15-function-basics/4-pow/solution.md index 19fe9011f..b9c295d52 100644 --- a/1-js/02-first-steps/15-function-basics/4-pow/solution.md +++ b/1-js/02-first-steps/15-function-basics/4-pow/solution.md @@ -10,8 +10,8 @@ function pow(x, n) { return result; } -let x = prompt("x?", ''); -let n = prompt("n?", ''); +let x = +prompt("x?", ''); +let n = +prompt("n?", ''); if (n < 1) { alert(`Power ${n} is not supported, use a positive integer`); From f7922edae4f6be29a50fb99eb47b378d0216e403 Mon Sep 17 00:00:00 2001 From: Bora Lee Date: Sun, 19 Jul 2026 10:41:53 +0900 Subject: [PATCH 9/9] Fix Prism API name: highlightElem -> highlightElement The article's prose and inline examples use Prism.highlightElem, which does not exist in the Prism.js API, while the demo code later in the same article correctly uses Prism.highlightElement. Unify on the real API name. Also pass only the element in forEach callbacks: forEach supplies (element, index, array), which would collide with the highlightElement(element, async, callback) signature if the method reference is passed directly. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MizgRqMWEBSTYhJ9YhSd2g --- 2-ui/99-ui-misc/01-mutation-observer/article.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/2-ui/99-ui-misc/01-mutation-observer/article.md b/2-ui/99-ui-misc/01-mutation-observer/article.md index 3cf6f5397..ecc89f6e6 100644 --- a/2-ui/99-ui-misc/01-mutation-observer/article.md +++ b/2-ui/99-ui-misc/01-mutation-observer/article.md @@ -128,13 +128,13 @@ Such snippet in an HTML markup looks like this: ... ``` -For better readability and at the same time, to beautify it, we'll be using a JavaScript syntax highlighting library on our site, like [Prism.js](https://prismjs.com/). To get syntax highlighting for above snippet in Prism, `Prism.highlightElem(pre)` is called, which examines the contents of such `pre` elements and adds special tags and styles for colored syntax highlighting into those elements, similar to what you see in examples here, on this page. +For better readability and at the same time, to beautify it, we'll be using a JavaScript syntax highlighting library on our site, like [Prism.js](https://prismjs.com/). To get syntax highlighting for above snippet in Prism, `Prism.highlightElement(pre)` is called, which examines the contents of such `pre` elements and adds special tags and styles for colored syntax highlighting into those elements, similar to what you see in examples here, on this page. -When exactly should we run that highlighting method? Well, we can do it on `DOMContentLoaded` event, or put the script at the bottom of the page. The moment our DOM is ready, we can search for elements `pre[class*="language"]` and call `Prism.highlightElem` on them: +When exactly should we run that highlighting method? Well, we can do it on `DOMContentLoaded` event, or put the script at the bottom of the page. The moment our DOM is ready, we can search for elements `pre[class*="language"]` and call `Prism.highlightElement` on them: ```js // highlight all code snippets on the page -document.querySelectorAll('pre[class*="language"]').forEach(Prism.highlightElem); +document.querySelectorAll('pre[class*="language"]').forEach(elem => Prism.highlightElement(elem)); ``` Everything's simple so far, right? We find code snippets in HTML and highlight them. @@ -146,9 +146,9 @@ let article = /* fetch new content from server */ articleElem.innerHTML = article; ``` -The new `article` HTML may contain code snippets. We need to call `Prism.highlightElem` on them, otherwise they won't get highlighted. +The new `article` HTML may contain code snippets. We need to call `Prism.highlightElement` on them, otherwise they won't get highlighted. -**Where and when to call `Prism.highlightElem` for a dynamically loaded article?** +**Where and when to call `Prism.highlightElement` for a dynamically loaded article?** We could append that call to the code that loads an article, like this: @@ -158,7 +158,7 @@ articleElem.innerHTML = article; *!* let snippets = articleElem.querySelectorAll('pre[class*="language-"]'); -snippets.forEach(Prism.highlightElem); +snippets.forEach(elem => Prism.highlightElement(elem)); */!* ```