Why do I get the console.log 'Undefined'

Hi there,

New to Javascript (and coding in general). I am currently learning functions in Javascript (link to the code I have made: https://gist.github.com/956c892e1409f6aff5108c66db97001e) and I am just wondering why it is that I get “Undefined” text in my console when I run the code.

Thanks for any help you can give me!

your function doesn’t have a return value

yet when you call the function, you attempt to log the returned result.