In this tutorial we will discuss functions and properties. While writing code you often need to do a lot of repetitive operations. This operations are better to write into special blocks – functions.
Function is subprogramm which works with any data and returns any result. Function often needs some secondary data – parameters. Besides, function has got a name (it is recommended, functions name tell developers, what it does) and function body – code. For example:
All languages has got its own functions. But always developers need to write their custom functions, because language functions can’t satisfy developer with him tasks.