The function calculates total, but it never sends that value back. The caller therefore receives undefined.
total
undefined
Add one return statement so the console displays:
Price with fee: 25
Do not move the console call into the function.