Terminate a function and return a value from a function to the calling function, if desired.
- value: Allowed data types: any variable or constant type.
A function to compare a sensor input to a threshold
The return keyword is handy to test a section of code without having to "comment out" large sections of possibly buggy code.
The result on Serial Monitor:
As we can see, the text after return is not printed.