In explanations for certain patterns, other anti-patterns are often used. I.E. in the explanation code for the "Single var pattern", the patterns for "Function Declarations" and "Access to the Global Object" are both ignored:
function updateElement() {
var el = document.getElementById("result")
, style = el.style;
// do something with el and style...
}
Shouldn't all patterns be used consistently, with only changing the focus example by example?
In explanations for certain patterns, other anti-patterns are often used. I.E. in the explanation code for the "Single var pattern", the patterns for "Function Declarations" and "Access to the Global Object" are both ignored:
function updateElement() {
var el = document.getElementById("result")
, style = el.style;
// do something with el and style...
}
Shouldn't all patterns be used consistently, with only changing the focus example by example?