A function allows you to call a code from a shorter one, and in this way allows you to reuse code.
void name (String message, int lineNum) { // ... }
name (String message, int lineNum) { return // ... }
Calling the function:
name ('text', 55);
void name ({String message, int lineNum}) { //... }
name ({String message, int lineNum}) { return //... }
name (message: 'A bug!', lineNum: 44);
Last updated 2 years ago