iterami/Docs.htm/JavaScript Standards
- All files must start with
'use strict';.
- Dot notation must be used for all: args, IDs, properties, and variables.
for..of loops should be used instead of for(;;) loops.
- Functions must be in alphabetical order.
- Functions with a fixed limited number of required args should pass them directly and unmodified.
- Functions with many args or args with default values should utilize a destructured args object.
- Global object usage should be done via
globalThis.
- Global variables should be alphabetically included at the bottom of the file.
- Swapping variables should be done via destructuring, such as
[a, b] = [b, a];.
- Trycatch should exclude the catch
(error) if it is not used.
- Use the button element instead of input buttons.
- Variables are
const by default and only changed to let if required.