Questions about Javascript Flow

Please, how to handle the returning value of a javascript function in a javascript flow?

What is the meaning of the output checkbox in a flow definition?

Thanks for any help