javascript-patterns icon indicating copy to clipboard operation
javascript-patterns copied to clipboard

JavaScript Design Patterns

Results 21 javascript-patterns issues
Sort by recently updated
recently updated
newest added

Hello everybody, This repository seems to be inactive for a quite long time. It has 20 open issues and 39 Pull Requests. That's why I create a new github organization...

It is kind of unclear why counting down and while (https://github.com/shichuan/javascript-patterns/blob/master/general-patterns/for-loops.html) are preferred patterns, because modern browsers preoptimize these constructs. Maybe it will be a good idea to include some...

On line 35 of the for-loop pattern the following comment appears. `// optimization 3 - substitute `i++` with `i = i + 1` or `i += 1` to avoid excessive...

define scareMe is function , when the prank = scareMe , i think the function 's mem-address-value copy to prank.prototype , is not a handle ,so the function run again...

seems it is only kind of trivil skill, https://github.com/shichuan/javascript-patterns/blob/master/general-patterns/function-declarations.html

Hello guys. In [this conditional pattern doc](https://github.com/shichuan/javascript-patterns/blob/master/general-patterns/conditionals.html), you say: > Using the normal pattern will generally outperform the regex (alternative method 1) in a loop, [...]" Then I made a...