New course! Every coder should learn Generative AI!
Try a free lesson+ 1
Return is used to deliver a value back from a function to the place where it was called from.
When you're not in a function to begin with and there's no place where you could deliver anything to, that doesn't make sense.