Skip to content

Commit 1026e4d

Browse files
authored
Merge pull request #1336 from dsaw/master
Grammar fixes
2 parents f0d591b + 8539d66 commit 1026e4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

up & going/ch2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ We're not going to cover all the nitty-gritty details of how the coercion in `==
266266
To boil down a whole lot of details to a few simple takeaways, and help you know whether to use `==` or `===` in various situations, here are my simple rules:
267267

268268
* If either value (aka side) in a comparison could be the `true` or `false` value, avoid `==` and use `===`.
269-
* If either value in a comparison could be of these specific values (`0`, `""`, or `[]` -- empty array), avoid `==` and use `===`.
269+
* If either value in a comparison could be one of these specific values (`0`, `""`, or `[]` -- empty array), avoid `==` and use `===`.
270270
* In *all* other cases, you're safe to use `==`. Not only is it safe, but in many cases it simplifies your code in a way that improves readability.
271271

272272
What these rules boil down to is requiring you to think critically about your code and about what kinds of values can come through variables that get compared for equality. If you can be certain about the values, and `==` is safe, use it! If you can't be certain about the values, use `===`. It's that simple.
@@ -329,7 +329,7 @@ The `==` comparison fails for a different reason. `a == b` could fail if it's in
329329

330330
## Variables
331331

332-
In JavaScript, variable names (including function names) must be valid *identifiers*. The strict and complete rules for valid characters in identifiers are a little complex when you consider nontraditional characters such as Unicode. If you only consider typical ASCII alphanumeric characters, though, the rules are simple.
332+
In JavaScript, variable names (including function names) must be valid *identifiers*. The strict and complete rules for valid characters in identifiers are a little complex when you consider nontraditional characters such as Unicode. If you only consider typical ASCII alphanumeric characters though, the rules are simple.
333333

334334
An identifier must start with `a`-`z`, `A`-`Z`, `$`, or `_`. It can then contain any of those characters plus the numerals `0`-`9`.
335335

0 commit comments

Comments
 (0)