Challenge
Guard clauses
Rewrite the four nested ifs in can_dock() as guard clauses that return a reason as soon as a check fails, keeping every answer the same, then add a new docking rule as one more guard with a default…
1 result
Challenge
Rewrite the four nested ifs in can_dock() as guard clauses that return a reason as soon as a check fails, keeping every answer the same, then add a new docking rule as one more guard with a default…