Skip to content

Commit 6092bef

Browse files
committed
Copyediting chapter 8
1 parent 2cf24e2 commit 6092bef

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

08_error.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ canYouSpotTheProblem();
5454

5555
{{index ECMAScript, compatibility}}
5656

57-
Code inside classes and modules (which we will discuss in [Chapter ?](modules)) is automatically strict. The old non-strict behavior still exists only because some old code might depend on it, and the language designers work hard to avoid breaking any existing programs.
57+
Code inside classes and modules (which we will discuss in [Chapter ?](modules)) is automatically strict. The old nonstrict behavior still exists only because some old code might depend on it, and the language designers work hard to avoid breaking any existing programs.
5858

5959
{{index "let keyword", [binding, global]}}
6060

@@ -86,7 +86,7 @@ let ferdinand = Person("Ferdinand"); // forgot new
8686

8787
We are immediately told that something is wrong. This is helpful.
8888

89-
Fortunately, constructors created with the `class` notation will always complain if they are called without `new`, making this less of a problem even in non-strict mode.
89+
Fortunately, constructors created with the `class` notation will always complain if they are called without `new`, making this less of a problem even in nonstrict mode.
9090

9191
{{index parameter, [binding, naming], "with statement"}}
9292

@@ -121,15 +121,15 @@ One thing about types is that they need to introduce their own complexity to be
121121

122122
When the types of a program are known, it is possible for the computer to _check_ them for you, pointing out mistakes before the program is run. There are several JavaScript dialects that add types to the language and check them. The most popular one is called [TypeScript](https://www.typescriptlang.org/). If you are interested in adding more rigor to your programs, I recommend you give it a try.
123123

124-
In this book, we'll continue using raw, dangerous, untyped JavaScript code.
124+
In this book, we will continue using raw, dangerous, untyped JavaScript code.
125125

126126
## Testing
127127

128128
{{index "test suite", "run-time error", automation, testing}}
129129

130130
If the language is not going to do much to help us find mistakes, we'll have to find them the hard way: by running the program and seeing whether it does the right thing.
131131

132-
Doing this by hand, again and again, is a really bad idea. Not only is it annoying, it also tends to be ineffective since it takes too much time to exhaustively test everything every time you make a change.
132+
Doing this by hand, again and again, is a really bad idea. Not only is it annoying, it also tends to be ineffective, since it takes too much time to exhaustively test everything every time you make a change.
133133

134134
Computers are good at repetitive tasks, and testing is the ideal repetitive task. Automated testing is the process of writing a program that tests another program. Writing tests is a bit more work than testing manually, but once you've done it, you gain a kind of superpower: it takes you only a few seconds to verify that your program still behaves properly in all the situations you wrote tests for. When you break something, you'll immediately notice rather than randomly running into it at some later time.
135135

0 commit comments

Comments
 (0)