Why am I seeing undefined output?

Hi coders,

I’m doing this web project with Js that I saw in repo on Github(link below on project link).
I have some input to compile and I ask as title said, why I don’t visualize calculus ouput but undefined?
I declared variable inside a click event on button and I don’t know if it’s correct procedure.

Also ask if there are any ways to make this script more readable programmatically.
Thanks :bowing_woman:

(link project)