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)

You attempt to assign a value to return_loan_amount and return_func_collateral from the functions updateLoanValue and updateCollateralValue. The problem is, neither of these functions explicitly return a value, so JavaScript returns undefined by default.