Skip to content

Commit 0fcf9f8

Browse files
committedMar 24, 2017
fixes
1 parent c9401b3 commit 0fcf9f8

File tree

58 files changed

+672
-642
lines changed

Some content is hidden

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

58 files changed

+672
-642
lines changed
 

‎1-js/01-getting-started/2-code-editors/article.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Code editors
22

3-
The code editor is the place where a programmer spends most his time.
3+
A code editor is the place where a programmer spends most of his time.
44

55
There are two archetypes: IDE and lightweight editors. Many people feel comfortable choosing one tool of each type.
66

@@ -32,7 +32,7 @@ They are mainly used to instantly open and edit a file.
3232

3333
The main difference between a "lightweight editor" and an "IDE" is that IDE works on a project-level, so it loads much more data on start, analyzes the project structure if needed and so on. A lightweight editor is much faster if we need only one file.
3434

35-
In practice, lightweight editors may have a lot of plugins including directory-level syntax analyzers and autocompleters, so there's no strict border between a lightweight editor and an IDE.
35+
In practice, lightweight editors may have a lot of plugins including directory-level syntax analyzers and autocompleters, so there's no strict border between a lightweight editor and an IDE.
3636

3737
The following options deserve your attention:
3838

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
# Developer console
22

3-
And the one more thing before we get down to coding.
4-
53
A code is error-prone. You are quite likely to have errors... Oh what I'm talking? You are *absolutely* going to make errors, at least if you're a human, not a [robot](https://en.wikipedia.org/wiki/Bender_(Futurama)).
64

75
But in the browser, a user doesn't see the errors by default. So, if something goes wrong in the script, we won't see what's broken and can't fix it.
86

97
To see errors and get a lot of other useful information about scripts, browsers have embedded "developer tools".
108

11-
**Most often developers lean towards Chrome or Firefox for the development.**
12-
13-
Other browsers also provide developer tools, but are usually in a "catching-up" position, compared to Chrome/Firefox which are the best.
14-
15-
Sometimes, it may be required to switch to another browser, if a problem is browser-specific, but that's rare.
9+
Most often developers lean towards Chrome or Firefox for the development, because developer tools are best there. Other browsers also provide developer tools, sometimes with special features, but usually are in "catching-up" position. So most people have a "favorite" browser and switch to others if a problem is browser-specific.
1610

1711
Developer tools are really powerful, there are many features. Here, for the start, we'll learn how to open them, look at errors and run JavaScript commands.
1812

@@ -34,10 +28,10 @@ It looks somewhat like this:
3428

3529
The exact look depends on your Chrome version. It changes from time to time, but should be similar.
3630

37-
- Here we can see the red-colored error message. In this case the script contains a "lalala" command, which was put there just because it is unknown.
31+
- Here we can see the red-colored error message. In this case the script contains an unknown "lalala" command.
3832
- On the right, there is a clickable link to the source `bug.html:12` with the line number where the error has occured.
3933

40-
Below the error message there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands and press enter to run them (`key:Shift+Enter` to input multiline commands).
34+
Below the error message there is a blue `>` symbol. It marks a "command line" where we can type JavaScript commands and press `key:Enter` to run them (`key:Shift+Enter` to input multiline commands).
4135

4236
Now we can see errors and that's enough for the start. We'll be back to developer tools later and cover debugging more in-depth in the chapter <info:debugging-chrome>.
4337

@@ -46,21 +40,21 @@ Now we can see errors and that's enough for the start. We'll be back to develope
4640

4741
Most other browsers use `key:F12` to open developer tools.
4842

49-
The look & feel of them is quite similar, once we know how to use one of them (can start with Chrome), can easily switch to another.
43+
The look & feel of them is quite similar. Once you know how to use one of them (can start with Chrome), you can easily switch to another.
5044

5145
## Safari
5246

53-
Safari (if you use Mac, not Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
47+
Safari (Mac browser, not supported for Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
5448

55-
There's a checkbox for that at the bottom of the "Advanced" pane of the preferences:
49+
Open Preferences and go to "Advanced" pane. There's a checkbox at the bottom of it:
5650

5751
![safari](safari.png)
5852

59-
Now `key:Cmd+Opt+C` can toggle the console. Also note that the new top menu item has appeared with many useful options.
53+
Now `key:Cmd+Opt+C` can toggle the console. Also note that the new top menu item named "Develop" has appeared. It has many commands and options.
6054

6155
## Summary
6256

63-
- Developer tools allow us to see errors, run commands, examine variables and much more.
57+
- Developer tools allow us to see errors, run commands, examine variables and much more.
6458
- They can be opened with `key:F12` for most browsers under Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
6559

66-
Now we have the environment ready. In the next section we get down to JavaScript.
60+
Now we have the environment ready. In the next section we get down to JavaScript.

0 commit comments

Comments
 (0)
Please sign in to comment.