Merge pull request #477 from odv/en

Added missing parenthesis in the functional class pattern example and removed an extra *so* from a paragraph
This commit is contained in:
Ilya Kantor 2017-03-28 10:49:18 +03:00 committed by GitHub
commit a5ff7708d2
2 changed files with 2 additions and 2 deletions

View file

@ -2,7 +2,7 @@
The tutorial that you're reading is about the core JavaScript, that is platform-independant. Further on you will be able learn Node.JS and other platforms that use it.
But we need a working environment to run our scripts, and, just because this book is online, the browser a good choice. We'll keep the amount of browser-specific commands (like `alert`) to minimum, so that you don't spend time on them if you plan to concentrate on another environment like Node.JS. From the other hand, browser details are explained in detail in the [next part](/ui) of the tutorial. So
But we need a working environment to run our scripts, and, just because this book is online, the browser a good choice. We'll keep the amount of browser-specific commands (like `alert`) to minimum, so that you don't spend time on them if you plan to concentrate on another environment like Node.JS. From the other hand, browser details are explained in detail in the [next part](/ui) of the tutorial.
So first let's see how to attach a script to the webpage. For server-side environments you can just execute it with a command like `"node my.js"` for Node.JS.

View file

@ -21,7 +21,7 @@ The constructor function below can be considered a class according to the defini
```js run
function User(name) {
this.sayHi = function() {
alert(name;
alert(name);
};
}