New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Return works only inside function.
So, if you want to return a value, you should define a function, and then use return inside it, and then call that function to have your work done