-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
72 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,45 @@ | ||
# Table of contents | ||
|
||
* [JS MythBusters](/README.md) | ||
* [Send your tip!]() | ||
* [Send your tip!](/send-tip.md) | ||
* [Bibliography](/bibliography.md) | ||
* [Resources](/resources.md) | ||
|
||
* [Workflow] | ||
* [Boolean condition](/workflow/boolean-conditions.md) | ||
* [Lookup table](/workflow/lookup-table.md) | ||
* [Math methods](/workflow/math.md) | ||
* [Memoizaton](/workflow/memoization.md) | ||
* [Scope](/workflow/scope.md) | ||
* [Variable access](/workflow/variable-access.md) | ||
|
||
* [V8] | ||
* [Hidden Class](/v8-tips/hidden-class.md) | ||
* [Float Number](/v8-tips/float-number.md) | ||
* [Inline initialization](/v8-tips/inline-initialization.md) | ||
* [Monomorphic](/v8-tips/monomorphic.md) | ||
* [use strict](/v8-tips/use-strict.md) | ||
* [Freeing memory](/v8-tips/freeing-memory.md) | ||
|
||
* [Array] | ||
* [Reallocation](/array/reallocation.md) | ||
* [.pop over .shift](/array/pop-or-shift.md) | ||
* [arguments is special](/array/arguments.md) | ||
|
||
* [Date] | ||
* [Creating timestamps](/date/timestamp.md) | ||
|
||
* [Error] | ||
* [Avoid try/catch](/error/try-catch.md) | ||
|
||
* [Function] | ||
* [new agnostic](/function/new.md) | ||
* [.bind is slower](/function/bind.md) | ||
|
||
* [RegexEp] | ||
* [Common sense](/regexp/common-sense.md) | ||
* [Focus on failing faster](/regexp/fail-faster.md) | ||
* [Correct method](/regexp/methods.md) | ||
|
||
* [String] | ||
* [+= for concat](/string/concat.md) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
#### Control flow based in boolean condition | ||
# Control flow based in boolean condition | ||
|
||
Always as possible, compare with a simple boolean (for example, in loops conditions): It's a more simple (and consecuentially faster): | ||
|
||
```js | ||
// slow | ||
// two boolean conditions = 0 and > 0 | ||
// two boolean conditions: `= 0` and `> 0` | ||
array.indexOf(i) >= 0 | ||
|
||
// fast | ||
// just one boolean condition | ||
// just one boolean condition: `!== 0` | ||
array.indexOf(i) !== 0 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.