Issue with trying to make code reusable by making it a function

I made just be fried from working on it all day. But building a calculator, trying to turn some code into reusable code so I can use it for when user clicks on buttons, and when user types the input in the input field. I am getting e is not defined. The function is created in the global scope and being used inside an event listener.
https://github.com/bsupinski/calculator
https://bsupinski.github.io/calculator/
Was this page helpful?