Use the return command if you need to return a variable/type that the calling code would need. For example, if you wrote a function that calculates the height of a mesh at a certain coordinate, you would expect to be able to get that value back to wherever you needed it. This is the function of return.