diff --git a/1-js/02-first-steps/04-variables/article.md b/1-js/02-first-steps/04-variables/article.md index 09b1172f..dda84af5 100644 --- a/1-js/02-first-steps/04-variables/article.md +++ b/1-js/02-first-steps/04-variables/article.md @@ -314,7 +314,7 @@ And the last note. There are some lazy programmers who, instead of declaring a n As the result, the variable is like a box where people throw different things without changing the sticker. What is inside it now? Who knows... We need to come closer and check. -Such a programmer saves a little bit on variable declaration, but looses ten times more on debugging the code. +Such a programmer saves a little bit on variable declaration, but loses ten times more on debugging the code. An extra variable is good, not evil. diff --git a/1-js/02-first-steps/05-types/article.md b/1-js/02-first-steps/05-types/article.md index 9c8cec65..c7f09efc 100644 --- a/1-js/02-first-steps/05-types/article.md +++ b/1-js/02-first-steps/05-types/article.md @@ -1,6 +1,6 @@ # Data types -A variable in JavaScript can contain any data. A variable can at one moment be a string and later recieve a numeric value: +A variable in JavaScript can contain any data. A variable can at one moment be a string and later receive a numeric value: ```js // no error @@ -8,7 +8,7 @@ let message = "hello"; message = 123456; ``` -Programming languages that allow such thing are called "dynamically typed", meaning that there are data types, but variables are not bound to any of them. +Programming languages that allow such things are called "dynamically typed", meaning that there are data types, but variables are not bound to any of them. There are 7 basic data types in JavaScript. Here we'll study the basics, and in next chapters we'll talk about each of them in detail. diff --git a/1-js/02-first-steps/12-while-for/article.md b/1-js/02-first-steps/12-while-for/article.md index 575cfa68..41ae8c08 100644 --- a/1-js/02-first-steps/12-while-for/article.md +++ b/1-js/02-first-steps/12-while-for/article.md @@ -82,7 +82,7 @@ do { } while (i < 3); ``` -This form of syntax is rarely used. Usually, if there's no special reason, the other form is preferred: `while(…) {…}`. +This form of syntax is rarely used except when you want the body of the loop to execute **at least once** regardless of the condition being truthy. Usually, the other form is preferred: `while(…) {…}`. ## The "for" loop diff --git a/1-js/07-object-oriented-programming/09-class/article.md b/1-js/07-object-oriented-programming/09-class/article.md index cb1beec0..a747bede 100644 --- a/1-js/07-object-oriented-programming/09-class/article.md +++ b/1-js/07-object-oriented-programming/09-class/article.md @@ -114,7 +114,7 @@ class User { constructor(name) { // invokes the setter - this.name = name; + this._name = name; } *!*