Functions may also return value along with the control, back to the caller. Such functions are called as returning functions.
Syntax
return_type function_name(){
//statements
return type
}
Example
void main(){
print(work);
}
String work(){
//function definition
return "I am working.";
}
It will produce the following output:-
I am working.