I made a calculator for my mom for Mother’s day to help with her granola business, it’s the first thing I’ve designed and built on my own with JavaScript so I know there’s a cleaner more efficient way to have written it. The goal is to make it simple for her to enter a recipe name, then go through the form to get the cost for each ingredient in that recipe and then a total price per an ounce. These values go into a table and once she’s finished adding ingredients I want her to be able to export it as a PNG or PDF. I also want to add a delete option on the table so she can remove an entry if she made a mistake.
I have most of those features working but I feel like there’s definitely a cleaner, more efficient way to have written my code. Does anyone have any suggestions or tips for cleaning it up and/or how to add the export functionality?
My codepen.