Cache Invalidation - lucasjwilber/seattle-301d52 GitHub Wiki
Functional Programming Characteristics: -Uses pure functions: functions that return the same result whenever given the same arguments (aka deterministic functions) -Doesn't cause any unintentional side-effects Basically, functions shouldn't contain any global variables that have the potential to change. If a function needs to use outside variables, they should be passed in as parameters. This way your functions will always behave consistently no matter how any other code changes.
Tips to make code easier to read: -return early from functions whenever practical. Place any conditionals that the code in the function relies on at the beginning. -if you're writing something complex like nested loops, store the outcome of each step in a well-named variable along the way, to make the process easier to read.