What is a return statement?

i do not know anything about this one.

With the exception of functions/methods marked as void, all functions/methods have at least one return statement in their code.

Return allows the function to output data for use in your code and declare the function/method as done.

It should be noted that you can only output one variable from an entire function. If you need to put out multiple pieces of data then you’d use a struct to group your data together into a single variable.

Privacy & Terms