Index: pages/coding-style.html diff --git a/pages/coding-style.html b/pages/coding-style.html index 553402cd508a746e0587e41d989f54f1b2d588b0..00eab294dbf12cfecba8bd881dc0328149ed98f9 100644 --- a/pages/coding-style.html +++ b/pages/coding-style.html @@ -24,9 +24,19 @@ title=Coding Style
bind()
to ensure the desired value of the this
variable, don’t use temporary variables as a replacement.}}if
statement, an else
statement or a loop spans over more than one line always enclose it with braces. When an if
or else
statement uses braces the opposing block should do too.}}let
/ const
), except when sharing global variables between scripts cannot be avoided.}}const
for constant expressions that could as well have been inlined (e.g. static parameters, imported modules, etc.).}}this
or arguments
variables.}}for..of
syntax if the loop index isn't required. (Rather than using for(;;)
or the forEach()
method.)}}Map
or Set
objects, rather than misusing plain objects, when you need a hash table.}}