Skip to content

Commit 1bf803f

Browse files
committed
Move to logical-style quote/punctuation
1 parent 5863cbc commit 1bf803f

11 files changed

Lines changed: 15 additions & 15 deletions

00_intro.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ program to jump back and forth any more. The `while` language
244244
construct takes care of that. It continues executing the block
245245
(wrapped in braces) below it as long as the condition it was given
246246
holds: `count <= 10`, which means “`count` is less than or equal to
247-
10.” We no longer have to create a temporary value and compare that
247+
10”. We no longer have to create a temporary value and compare that
248248
to zero. This was an uninteresting detail, and the power of
249249
programming languages is that they take care of uninteresting details
250250
for us.

01_values.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ multiplication. Putting an operator between two values will
153153
new value.
154154

155155
(((parentheses)))Does the example mean “add 4 and 100, and multiply
156-
the result by 11,” or is the multiplication done before the adding?
156+
the result by 11”, or is the multiplication done before the adding?
157157
As you might have guessed, the multiplication happens first. But, as
158158
in mathematics, this can be changed by wrapping the addition in
159159
parentheses:

02_program_structure.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ The `isNaN` function is a standard function that return `true` if the
370370
argument it is given is `NaN`. The `Number` function happens to return
371371
`NaN` when you give it a string that doesn't represent a valid number.
372372
Thus, the condition expresses “unless `theNumber` is not-a-number, do
373-
this.”
373+
this”.
374374

375375
(((else keyword)))Often you have not only code that must be executed
376376
when a certain condition holds but also code that handles the other

03_functions.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,11 +348,11 @@ context from the stack, and uses it to continue execution.
348348
(((stack overflow)))(((recursion)))This stack requires space in the
349349
computer's memory to be stored. When the stack grows too big, the
350350
computer will give up with a message like “out of stack space” or “too
351-
much recursion.” The following code illustrates that—it asks the
351+
much recursion”. The following code illustrates that—it asks the
352352
computer a really hard question, which causes an infinite
353353
back-and-forth between two functions. Or rather, it would be infinite,
354354
if we had an infinite stack. As it is, it will run out of space, or
355-
“blow the stack.”
355+
“blow the stack”.
356356

357357
// test: no
358358

@@ -380,7 +380,7 @@ alert("Hello", "Good Evening", "How do you do?");
380380

381381
(((alert function)))The function `alert` officially accepts only one
382382
argument. Yet when you call it like this, it does not complain. It
383-
simply ignores the other arguments and shows you “Hello.”
383+
simply ignores the other arguments and shows you “Hello”.
384384

385385
(((undefined value)))JavaScript is extremely broad-minded about the
386386
amount of arguments you pass to a function. If you pass too many, the
@@ -568,7 +568,7 @@ marginally faster.
568568
Regardless, recursion is not always just a less-efficient alternative
569569
to looping. Some problems are much easier to solve with recursion than
570570
with loops. Most often these are problems that require exploring or
571-
processing several “branches,” each of which might branch out again
571+
processing several “branches”, each of which might branch out again
572572
into more branches.
573573

574574
Consider this puzzle: By starting from the number 1 and repeatedly

04_data.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ is described in chapter 6.
178178

179179
Properties that contain functions are generally called _methods_ of
180180
the value they belong to. As in “`toUpperCase` is a method of a
181-
string.”
181+
string”.
182182

183183
This example demonstrates some methods that array objects have:
184184

05_higher_order.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ horizon.
615615
== The cost ==
616616

617617
In the happy land of elegant code and pretty rainbows, there lives a
618-
mean spoil-sport monster called “_inefficiency_.”
618+
mean spoil-sport monster called “_inefficiency_”.
619619

620620
Reducing the processing of an array into a sequence of cleanly
621621
separated steps that each do something with the array and produce a

06_object.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ a brief history of objects as a programming construct.
2626
programming stories, starts with the problem of complexity. One
2727
philosophy is that this complexity can be made manageable by
2828
separating it into small compartments that are isolated from each
29-
other. These compartments ended up with the name “objects.”
29+
other. These compartments ended up with the name “objects”.
3030

3131
(((encapsulation)))(((method)))(((interface)))An object is a hard
3232
shell that encapsulates the gooey complexity inside of it, and instead

07_elife.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ drawback of being crude and inaccurate. But this simulation is
3636
intended to be amusing, not accurate, so we can freely cut such
3737
corners.
3838

39-
A world can be defined with a “plan,” which is an array of strings
39+
A world can be defined with a “plan”, which is an array of strings
4040
that lay out the world's grid, using one character per square, and a
4141
legend, which is an object that tells us, for each character, what it
4242
means.

08_error.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ console.log(testPoint());
191191
(((test suite)))(((testing frameworks)))Various pieces of helper
192192
software exist that help you build and run collections of tests (“test
193193
suites”), making them easier to write, and producing more informative
194-
information when they fail. These are called “testing frameworks.”
194+
information when they fail. These are called _testing frameworks_.
195195

196196
== Debugging ==
197197

@@ -440,7 +440,7 @@ What if `body` raises an exception? In that case, the call to
440440
`try` statements have. They may be followed by a `finally` block
441441
(instead of, or in addition to the `catch` block). This means “no
442442
matter _what_ happens, run this code after trying to run the code in
443-
the `try` block.” If a function has to clean something up, the cleanup
443+
the `try` block”. If a function has to clean something up, the cleanup
444444
code should usually be put into a `finally` block:
445445

446446
// include_code

10_modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ that works well requires quite a bit of insight and foresight.
606606
The best way to learn the value of good interface design is to use
607607
lots of interfaces, some good, some horrible. Experience will teach
608608
you what works and what doesn't. Never assume that a painful interface
609-
is “just the way it is.” Fix it, or wrap it in a new interface that
609+
is “just the way it is”. Fix it, or wrap it in a new interface that
610610
works better for you.
611611

612612
=== Predictability ===

0 commit comments

Comments
 (0)