From bba9f7df211d63293e2a957872d156a0a6dfcd48 Mon Sep 17 00:00:00 2001 From: Marcel Ribeiro-Dantas Date: Sat, 10 Dec 2022 12:05:34 -0300 Subject: Fixes typos in many different English articles Signed-off-by: Marcel Ribeiro-Dantas --- javascript.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'javascript.html.markdown') diff --git a/javascript.html.markdown b/javascript.html.markdown index b290b553..ec250e45 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -620,7 +620,7 @@ function isEven(number) { }; // I put the word "equivalent" in double quotes because a function defined -// using the lambda syntax cannnot be called before the definition. +// using the lambda syntax cannot be called before the definition. // The following is an example of invalid usage: add(1, 8); -- cgit v1.2.3 From 6c1de0fcb49b256916bbb022802ba45e4208668a Mon Sep 17 00:00:00 2001 From: Anoint <72187543+whoami-anoint@users.noreply.github.com> Date: Fri, 21 Jul 2023 00:47:46 +0530 Subject: Update javascript.html.markdown --- javascript.html.markdown | 1 + 1 file changed, 1 insertion(+) (limited to 'javascript.html.markdown') diff --git a/javascript.html.markdown b/javascript.html.markdown index ec250e45..41ed7dea 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -671,6 +671,7 @@ Mozilla Developer Network. [5]: http://bonsaiden.github.io/JavaScript-Garden/ [6]: http://www.amazon.com/gp/product/0596805527/ [7]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript +[8]: https://www.javascripttutorial.net/ [8]: http://eloquentjavascript.net/ [10]: http://jstherightway.org/ [11]: https://javascript.info/ -- cgit v1.2.3 From 63a2c260297e7e00ccd2c893b341db45e3d53a71 Mon Sep 17 00:00:00 2001 From: Chris Harding Date: Fri, 25 Aug 2023 03:54:23 +0000 Subject: [javascript/en] Reorder block (#4706) It makes more sense here, as in the type coercion on addition is what leads to the weird behavoir. Co-authored-by: Chris Harding --- javascript.html.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'javascript.html.markdown') diff --git a/javascript.html.markdown b/javascript.html.markdown index 41ed7dea..cb530bbb 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -105,6 +105,10 @@ false; "1, 2, " + 3; // = "1, 2, 3" "Hello " + ["world", "!"]; // = "Hello world,!" +// ...which can result in some weird behaviour... +13 + !0; // 14 +"13" + !0; // '13true' + // and are compared with < and > "a" < "b"; // = true @@ -116,10 +120,6 @@ null == undefined; // = true "5" === 5; // = false null === undefined; // = false -// ...which can result in some weird behaviour... -13 + !0; // 14 -"13" + !0; // '13true' - // You can access characters in a string with `charAt` "This is a string".charAt(0); // = 'T' -- cgit v1.2.3 From 224e01864a73eb306f23a18f32490c1dd51addee Mon Sep 17 00:00:00 2001 From: ven Date: Wed, 14 Feb 2024 11:01:52 +0100 Subject: Fix 4841 --- javascript.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'javascript.html.markdown') diff --git a/javascript.html.markdown b/javascript.html.markdown index cb530bbb..08f1d8fb 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -655,7 +655,7 @@ attached terminal [Javascript: The Right Way][10] is a guide intended to introduce new developers to JavaScript and help experienced developers learn more about its best practices. -[Javascript:Info][11] is a modern javascript tutorial covering the basics (core language and working with a browser) +[javascript.info][11] is a modern javascript tutorial covering the basics (core language and working with a browser) as well as advanced topics with concise explanations. -- cgit v1.2.3 From 4fafc296669ffccab831bcd5d3407cf934f0d228 Mon Sep 17 00:00:00 2001 From: Federico <96267363+dalps@users.noreply.github.com> Date: Thu, 14 Mar 2024 02:40:43 +0100 Subject: Quote this keyword in explanation (#4862) --- javascript.html.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'javascript.html.markdown') diff --git a/javascript.html.markdown b/javascript.html.markdown index 08f1d8fb..4e7c5c09 100644 --- a/javascript.html.markdown +++ b/javascript.html.markdown @@ -405,7 +405,7 @@ myObj = { }; myObj.myFunc(); // = "Hello world!" -// What this is set to has to do with how the function is called, not where +// What `this` is set to has to do with how the function is called, not where // it's defined. So, our function doesn't work if it isn't called in the // context of the object. var myFunc = myObj.myFunc; -- cgit v1.2.3