Refactor this junior’s code

This is an example of a small application created by a junior developer. Using your mental model of constructables, refactor and improve the code.

The app has a single purpose: calculate and log the shipping cost for each package to the console.

That’s all the information you have, you will have to read the code to understand what the junior is attempting to do. As a senior, teacher or mentor, this is often the challenge you will have: reading other people’s code without much context.

Links & Resources