Skip to content

Commit f081d60

Browse files
committed
Merge pull request getify#388 from kemar/typo_double_the
Typo: double "the"
2 parents 2d4c0ef + e7a7086 commit f081d60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

types & grammar/ch4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ I find this to be cleaner code than the previous `>= 0` / `== -1` clutter.
642642

643643
There's one more place `~` may show up in code you run accross: some developers use the double tilde `~~` to truncate the decimal part of a `number` (i.e., "coerce" it to a whole number "integer"). It's commonly (though mistakingly) said this is the same result as calling `Math.floor(..)`.
644644

645-
How `~~` works is that the first `~` applies the `ToInt32` "coercion" and does the the bitwise flip, and then the second `~` does another bitwise flip, flipping all the bits back to the original state. The end result is just the `ToInt32` "coercion" (aka truncation).
645+
How `~~` works is that the first `~` applies the `ToInt32` "coercion" and does the bitwise flip, and then the second `~` does another bitwise flip, flipping all the bits back to the original state. The end result is just the `ToInt32` "coercion" (aka truncation).
646646

647647
**Note:** The bitwise double-flip of `~~` is very similar to the parity double-negate `!!` behavior, explained in the "Explicitly: * --> Boolean" section later.
648648

0 commit comments

Comments
 (0)