Confirmed users
14,525
edits
(→Idioms) |
(→Idioms) |
||
| Line 317: | Line 317: | ||
5. Use assertJSProperty(object, property) when evaluating JS Object Properties | 5. Use assertJSProperty(object, property) when evaluating JS Object Properties | ||
6. Use array.forEach() for iterating array elements | |||
<pre> | |||
array.forEach(function(elem, [index, [array]]) { | |||
statements; | |||
}, [thisObject]); | |||
</pre> | |||
== Refactoring == | == Refactoring == | ||