When I try to use return keyword in if block then it generate error but not in function why ?

Please suggest .

3/20/2020 1:06:24 PM


1 Answer

New Answer


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.