@@ -18,34 +18,34 @@ and making them do the things you want them to do isn't always easy.
1818If the task you have for your computer is a common, well-understood
1919one, such as showing you your email or acting like a calculator, you
2020can open the appropriate ((application)) and get to work. But for
21- unique or open ended tasks, there may not be an application.
21+ unique or open- ended tasks, there may not be an application.
2222
23- That is where _ ((programming))_ may come in. Programming is the act of
24- constructing a program —a set of precise instructions, that tell a
23+ That is where ((programming)) may come in. _ Programming _ is the act of
24+ constructing a _ program _ —a set of precise instructions that tell a
2525computer what to do. Because computers are dumb, pedantic beasts,
2626programming is fundamentally tedious and frustrating.
2727
2828{{index [ programming, "joy of"] , speed}}
2929
30- Fortunately, if you can get over that, and maybe even enjoy the rigor
30+ Fortunately, if you can get over that fact , and maybe even enjoy the rigor
3131of thinking in terms that dumb machines can deal with, programming can
3232be very rewarding. It allows you to do things that would take
3333_ forever_ by hand, in seconds. It is a way to make your computer tool
3434do things that it couldn't do before. And it provides a wonderful
3535exercise in abstract thinking.
3636
37- Most programming is done with ((programming language))s. A programming
38- language is an artificially constructed language used to instruct
37+ Most programming is done with ((programming language))s. A _ programming
38+ language _ is an artificially constructed language used to instruct
3939computers. It is interesting that the most effective way we've found
4040to communicate with a computer borrows so heavily from the way we
4141communicate with each other. Like human languages, computer languages
42- allow words and phrases to be combined in new ways, allowing you to
42+ allow words and phrases to be combined in new ways, making it possible to
4343express ever new concepts.
4444
4545{{index [ JavaScript, "availability of"] , "casual computing"}}
4646
47- Language-based interfaces, which at one point were the main way in
48- which people interacted with computers, have largely been replaced
47+ Language-based interfaces, which at one point were the main method of interacting
48+ with computers, have largely been replaced
4949with easier, more constrained interfaces. But they are still there, if
5050you know where to look. One such language, JavaScript, is built into
5151every modern web ((browser)) and is thus available on almost every
@@ -103,7 +103,7 @@ involved, and to make the whole thing tick, we have to consider the
103103ways in which these parts interconnect and contribute to the operation
104104of the whole.
105105
106- A ((computer)) is a machine that acts as a host for these immaterial
106+ A ((computer)) is a physical machine that acts as a host for these immaterial
107107machines. Computers themselves can do only stupidly straightforward
108108things. The reason they are so useful is that they do these things at
109109an incredibly high ((speed)). A program can ingeniously combine an
@@ -134,7 +134,7 @@ zone.
134134
135135This is not only boring, it is also ineffective. New problems often
136136require new solutions. The field of programming is young and still
137- developing rapidly, and is varied enough to have space for wildly
137+ developing rapidly, and is varied enough to have room for wildly
138138different approaches. There are many terrible mistakes to make in
139139program design, and you should go ahead and make them so that you
140140understand them. A sense of what a good program looks like is
@@ -197,7 +197,7 @@ could be written in English like this:
197197
198198Although that is already more readable than the soup of bits, it is
199199still rather obscure. Using names instead of numbers for the
200- instructions and memory locations helps.
200+ instructions and memory locations helps:
201201
202202``` {lang: "text/plain"}
203203 Set “total” to 0.
@@ -222,7 +222,7 @@ of the number that we are currently looking at. The lines using
222222` compare ` are probably the weirdest ones. The program wants to see
223223whether ` count ` is equal to 11 in order to decide whether it can stop
224224running. Because our hypothetical machine is rather primitive, it can
225- only test whether a number is zero and make a decision (or jump) based
225+ only test whether a number is zero and make a decision based
226226on that. So it uses the memory location labeled ` compare ` to compute
227227the value of ` count - 11 ` and makes a decision based on that value.
228228The next two lines add the value of ` count ` to the result and
@@ -273,7 +273,7 @@ console.log(sum(range(1, 10)));
273273{{index readability}}
274274
275275The moral of this story is that the same program can be expressed in
276- long and short, unreadable and readable ways. The first version of the
276+ both long and short, unreadable and readable ways. The first version of the
277277program was extremely obscure, whereas this last one is almost
278278English: ` log ` the ` sum ` of the ` range ` of numbers from 1 to 10. (We
279279will see in [ later chapters] ( data ) how to define operations like ` sum `
@@ -300,15 +300,15 @@ JavaScript was introduced in 1995 as a way to add programs to web
300300pages in the Netscape Navigator browser. The language has since been
301301adopted by all other major graphical web browsers. It has made modern
302302web applications possible—applications with which you can interact
303- directly, without doing a page reload for every action. But it is also
303+ directly without doing a page reload for every action. JavaScript is also
304304used in more traditional websites to provide various forms of
305305interactivity and cleverness.
306306
307307{{index Java, naming}}
308308
309309It is important to note that JavaScript has almost nothing to do with
310310the programming language named Java. The similar name was inspired by
311- marketing considerations, rather than good judgment. When JavaScript
311+ marketing considerations rather than good judgment. When JavaScript
312312was being introduced, the Java language was being heavily marketed and
313313was gaining popularity. Someone thought it was a good idea to try to
314314ride along on this success. Now we are stuck with the name.
@@ -342,7 +342,7 @@ point them out to you.
342342
343343This flexibility also has its advantages, though. It leaves space for
344344a lot of techniques that are impossible in more rigid languages, and
345- as you will see (for example in [ Chapter ?] ( modules ) ) it can be used
345+ as you will see (for example in [ Chapter ?] ( modules ) ), it can be used
346346to overcome some of JavaScript's shortcomings. After ((learning)) the
347347language properly and working with it for a while, I have learned to
348348actually _ like_ JavaScript.
@@ -358,14 +358,14 @@ used language in such a radical way turned out to be politically
358358difficult, and work on the version 4 was abandoned in 2008, leading to
359359a much less ambitious version 5, which only made some uncontroversial
360360improvements, coming out in 2009. Then in 2015 version 6 came out, a
361- major update which included some of the ideas planned for version 4.
361+ major update that included some of the ideas planned for version 4.
362362Since then we've had new, small updates every year.
363363
364364The fact that the language is evolving means that browsers have to
365365constantly keep up, and if you're using an older one, it may not
366366support every feature. The language designers are careful to not make
367367any changes that could break existing programs, so new browsers can
368- still run old programs. In this book, I will use the 2017 version of
368+ still run old programs. In this book, I'm using the 2017 version of
369369JavaScript.
370370
371371{{index [ JavaScript, "uses of"] }}
@@ -374,15 +374,15 @@ Web browsers are not the only platforms on which JavaScript is used.
374374Some databases, such as MongoDB and CouchDB, use JavaScript as their
375375scripting and query language. Several platforms for desktop and server
376376programming, most notably the ((Node.js)) project (the subject of
377- [ Chapter ?] ( node ) ) provide an environment for programming JavaScript
377+ [ Chapter ?] ( node ) ), provide an environment for programming JavaScript
378378outside of the browser.
379379
380380## Code, and what to do with it
381381
382382{{index "reading code", "writing code"}}
383383
384- Code is the text that makes up programs. Most chapters in this book
385- contain quite a lot of it . I believe reading code and writing ((code))
384+ _ Code _ is the text that makes up programs. Most chapters in this book
385+ contain quite a lot of code . I believe reading code and writing ((code))
386386are indispensable parts of ((learning)) to program. Try to not just
387387glance over the examples—read them attentively and understand them.
388388This may be slow and confusing at first, but I promise that you'll
@@ -422,14 +422,14 @@ if}}
422422{{index "developer tools", "JavaScript console"}}
423423
424424If you want to run the programs defined in this book outside of the
425- book's website, some care is required. Many examples stand on their
425+ book's website, some care will be required. Many examples stand on their
426426own and should work in any JavaScript environment. But code in later
427427chapters is often written for a specific environment (the browser or
428428Node.js) and can run only there. In addition, many chapters define
429429bigger programs, and the pieces of code that appear in them depend on
430430each other or on external files. The
431431[ sandbox] ( https://eloquentjavascript.net/code ) on the website provides
432- links to Zip files containing all of the scripts and data files
432+ links to Zip files containing all the scripts and data files
433433necessary to run the code for a given chapter.
434434
435435## Overview of this book
@@ -447,7 +447,7 @@ robot](robot), a [programming language](language), a [platform
447447game] ( game ) , a [ pixel paint program] ( paint ) , and a [ dynamic
448448website] ( skillsharing ) .
449449
450- The language part of the book starts with four chapters to introduce
450+ The language part of the book starts with four chapters that introduce
451451the basic structure of the JavaScript language. They introduce
452452[ control structures] ( program_structure ) (such as the ` while ` word you
453453saw in this introduction), [ functions] ( functions ) (writing your own
0 commit comments