diff options
author | Boris Verkhovskiy <boris.verk@gmail.com> | 2024-04-03 04:31:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-03 04:31:13 -0700 |
commit | fbf132752b743d0f43c3395da0699bee53da22df (patch) | |
tree | 56da43c86e1aebd24e3913b405e21d6f2812e9a3 /javascript.html.markdown | |
parent | 247dc6e86c1421fa031e4b61c42c05ca6e09bfb0 (diff) | |
parent | c166f2acb295627c5ae305a6dd517a27ca8fece6 (diff) |
Merge branch 'master' into patch-1
Diffstat (limited to 'javascript.html.markdown')
-rw-r--r-- | javascript.html.markdown | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/javascript.html.markdown b/javascript.html.markdown index b290b553..4e7c5c09 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' @@ -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; @@ -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); @@ -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. @@ -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/ |