Skip to content

Commit 5404c22

Browse files
committed
Merge branch 'master' of https://github.com/javascript-tutorial/en.javascript.info into dragndrop
2 parents e044661 + 9b5c1c9 commit 5404c22

File tree

119 files changed

+2505
-900
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+2505
-900
lines changed

1-js/01-getting-started/1-intro/article.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,15 @@ So recently a plethora of new languages appeared, which are *transpiled* (conver
105105

106106
Modern tools make the transpilation very fast and transparent, actually allowing developers to code in another language and auto-converting it "under the hood".
107107

108+
The most used are
108109
Examples of such languages:
109110

110111
- [CoffeeScript](http://coffeescript.org/) is a "syntactic sugar" for JavaScript. It introduces shorter syntax, allowing us to write clearer and more precise code. Usually, Ruby devs like it.
111112
- [TypeScript](http://www.typescriptlang.org/) is concentrated on adding "strict data typing" to simplify the development and support of complex systems. It is developed by Microsoft.
112-
- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps). It was initially offered by Google as a replacement for JavaScript, but as of now, browsers require it to be transpiled to JavaScript just like the ones above.
113+
- [Flow](http://flow.org/) also adds data typing, but in a different way. Developed by Facebook.
114+
- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps), but also can be transpiled to JavaScript. Developed by Google.
113115

114-
There are more. Of course, even if we use one of these languages, we should also know JavaScript to really understand what we're doing.
116+
There are more. Of course, even if we use one of transpiled languages, we should also know JavaScript to really understand what we're doing.
115117

116118
## Summary
117119

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
# Manuals and specifications
3+
4+
This book is a *tutorial*. It aims to help you gradually learn the language. But once you're familiar with the basics, you'll need other sources.
5+
6+
7+
## Specification
8+
9+
**The ECMA-262 specification** contains the most in-depth, detailed and formalized information about JavaScript. It defines the language.
10+
11+
But being that formalized, it's difficult to understand at first. So if you need the most trustworthy source of information about the language details, it's the right place. But it's not for everyday use.
12+
13+
The latest draft is at <https://tc39.es/ecma262/>.
14+
15+
To read about bleeding-edge features, that are not yet widely supported, see proposals at <https://github.com/tc39/proposals>.
16+
17+
Also, if you're in developing for the browser, then there are other specs covered in the [second part](info:browser-environment) of the tutorial.
18+
19+
## Manuals
20+
21+
- **MDN (Mozilla) JavaScript Reference** is a manual with examples and other information. It's great to get in-depth information about individual language functions, methods etc.
22+
23+
One can find it at <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference>.
24+
25+
Although, it's often best to use an internet search instead. Just use "MDN [term]" in the query, e.g. <https://google.com/search?q=MDN+parseInt> to search for `parseInt` function.
26+
27+
28+
- **MSDN** – Microsoft manual with a lot of information, including JavaScript (often referrerd to as JScript). If one needs something specific to Internet Explorer, better go there: <http://msdn.microsoft.com/>.
29+
30+
Also, we can use an internet search with phrases such as "RegExp MSDN" or "RegExp MSDN jscript".
31+
32+
## Feature support
33+
34+
JavaScript is a developing language, new features get added regularly.
35+
36+
To see their support among browser-based and other engines, see:
37+
38+
- <http://caniuse.com> - per-feature tables of support, e.g. to see which engines support modern cryptography functions: <http://caniuse.com/#feat=cryptography>.
39+
- <https://kangax.github.io/compat-table> - a table with language features and engines that support those or don't support.
40+
41+
All these resources are useful in real-life development, as they contain valuable information about language details, their support etc.
42+
43+
Please remember them (or this page) for the cases when you need in-depth information about a particular feature.

1-js/01-getting-started/2-code-editors/article.md renamed to 1-js/01-getting-started/3-code-editors/article.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ An IDE loads the project (which can be many files), allows navigation between fi
1212

1313
If you haven't selected an IDE yet, consider the following options:
1414

15-
- [WebStorm](http://www.jetbrains.com/webstorm/) for frontend development. The same company offers other editors for other languages (paid).
16-
- [Netbeans](http://netbeans.org/) (free).
15+
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free).
16+
- [WebStorm](http://www.jetbrains.com/webstorm/) (cross-platform, paid).
1717

18-
All of these IDEs are cross-platform.
18+
For Windows, there's also "Visual Studio", not to be confused with "Visual Studio Code". "Visual Studio" is a paid and mighty Windows-only editor, well-suited for the .NET platform. It's also good at JavaScript. There's also a free version [Visual Studio Community](https://www.visualstudio.com/vs/community/).
1919

20-
For Windows, there's also "Visual Studio", not to be confused with "Visual Studio Code." "Visual Studio" is a paid and mighty Windows-only editor, well-suited for the .NET platform. A free version of it is called [Visual Studio Community](https://www.visualstudio.com/vs/community/).
21-
22-
Many IDEs are paid but have a trial period. Their cost is usually negligible compared to a qualified developer's salary, so just choose the best one for you.
20+
Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a qualified developer's salary, so just choose the best one for you.
2321

2422
## Lightweight editors
2523

@@ -33,21 +31,11 @@ In practice, lightweight editors may have a lot of plugins including directory-l
3331

3432
The following options deserve your attention:
3533

36-
- [Visual Studio Code](https://code.visualstudio.com/) (cross-platform, free) also has many IDE-like features.
3734
- [Atom](https://atom.io/) (cross-platform, free).
3835
- [Sublime Text](http://www.sublimetext.com) (cross-platform, shareware).
3936
- [Notepad++](https://notepad-plus-plus.org/) (Windows, free).
4037
- [Vim](http://www.vim.org/) and [Emacs](https://www.gnu.org/software/emacs/) are also cool if you know how to use them.
4138

42-
## My favorites
43-
44-
The personal preference of the author is to have both an IDE for projects and a lightweight editor for quick and easy file editing.
45-
46-
I'm using:
47-
48-
- As an IDE for JS -- [WebStorm](http://www.jetbrains.com/webstorm/) (I switch to one of the other JetBrains offerings when using other languages)
49-
- As a lightweight editor -- [Sublime Text](http://www.sublimetext.com) or [Atom](https://atom.io/).
50-
5139
## Let's not argue
5240

5341
The editors in the lists above are those that either I or my friends whom I consider good developers have been using for a long time and are happy with.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

1-js/02-first-steps/03-strict-mode/article.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,17 @@ For the future, when you use a browser console to test features, please note tha
5353
5454
Sometimes, when `use strict` makes a difference, you'll get incorrect results.
5555
56-
Even if we press `key:Shift+Enter` to input multiple lines, and put `use strict` on top, it doesn't work. That's because of how the console executes the code internally.
56+
You can try to press `key:Shift+Enter` to input multiple lines, and put `use strict` on top, like this:
5757
58-
The reliable way to ensure `use strict` would be to input the code into console like this:
58+
```js
59+
'use strict'; <Shift+Enter for a newline>
60+
// ...your code
61+
<Enter to run>
62+
```
63+
64+
It works in most browsers, namely Firefox and Chrome.
65+
66+
If it doesn't, the most reliable way to ensure `use strict` would be to input the code into console like this:
5967

6068
```js
6169
(function() {

0 commit comments

Comments
 (0)