This is code used for the freeCodeCamp cash register project.
This code isn't the most optimal, but it works and this was the hardest challenge I ran into to the point I put it off for a few years (!). It works with minimal changes. (just need to remove module.exports
)