Disregard the comments, they are written in Danish because it's for a school task. I am in need of assistance. My loop is returning undefined values in my terminal, and I'm struggling to identify the problem. Despite functioning correctly and providing the right values, the presence of these 'undefined' values is bothering me.
UPDATE: The issue has been resolved by @aqq. Thank you for the assistance everyone!