The simple example of calculating and formatting a bill for a video store opened my
refactoring book in 1999. If done in modern Javascript, there are several directions you
could take the refactoring. I explore four here: refactoring to top level functions,
to a nested function with a dispatcher, using classes, and transformation using an
intermediate data structure.
Published on May 18, 2016 07:05