This Week: Replace comments with functions
This week, look for comments that can be replaced with function calls.
Often, comments explain something that could better be described with code:
This is a great opportunity to extract the commented code into a new function:
This is more readable to somebody skimming the 'example' function.
The reader no longer needs to concern themselves with how free shipping is applied, only that it is applied in a particular code path.
Have a great week!