Ahmed Elgendy thinks this is interesting:

Writing code to process and check passengers

Now typically you’d write a function for each of these conditions: one to check the no-fly-list, one to check that every passenger has paid, and one to print out all the passengers. But if we wrote that code and stepped back to look at it, we’d find that all these functions look roughly the same, like this:

Share this highlight

Get Instant Access Now

Unlock the rest of Head First JavaScript Programming
and 30,000 other books and videos

By clicking this box, you confirm that you have read and agree to the terms and conditions of our Membership Agreement, and you understand that when your trial period ends, you will be required to provide billing information if you wish to continue using the service.