I'm not sure why this "Golf Code" isn't working

Hi everyone!

I’m going through the Javascript curriculum, and ran into some trouble in this golf code challenge. The system says I failed every test, however when i input parameters myself, they show up correctly in the console. Basically, I’m using the first 3 conditions to catch exceptions that the final block of code wouldn’t be able to handle. I’m not sure why it’s wrong. Any help would be appreciated :slight_smile:

Hello and welcome to the freeCodeCamp community~!

You are using console.log() calls. Your function does not actually return anything.

2 Likes

oh. my. gosh. :joy: thanks, ill give it another shot

worked instantly! wonderful learning experience :orangutan: