What do you think?
Rate this book
592 pages, Paperback
First published August 19, 2019
We've identified two promising cleanups: First, shopping_cart_total, the global variable, is not being read anywhere. Second, calc_cart_total() is a superfluous function. Let's do the cleanup on the next page.
We identified two things on the last page: shopping_cart_total was not being used, and the function calc_cart_total() was superfluous. Let's inline its code into add_item_to_cart(), where it was called.