SIGN IN SIGN UP

Clean Code concepts adapted for JavaScript

94320 0 0 JavaScript

Rephrase default value advice

- The original document asserted that "Short-circuiting is cleaner than conditionals"
- ...only to override this assertion later with "Use default arguments instead of short circuiting."
- This is a poor design-choice for an advisory document.

        - If you are going to say x > y,
        - then later say z > x,
        - you should just say z > x > y upfront.
        - Otherwise, many people might not see the z > x later on,
        - because many people will probably use this as a referential document. They probably won't read the entire work.
A
Anton Paras committed
dfb9544da58927596d6c2aea294fb98ca55a7590
Parent: fa5f27d
Committed by GitHub <noreply@github.com> on 1/6/2017, 4:11:35 AM