Predefined functions are great. But what is even better is that you can define your own function!
Before we go deeper, we need to realize that we already have one function,
The main function is very important, since it is the first function that gets executed when you press Play.
Now let's define a simple function:
It will say hello to someone.
fun1node and rename it to
name, select String as parameter type
"Hello " + name
mainto go back to main function
Callcommand and type
Run the program, it should display
Hello Tom in the output.
Functions are a powerful tool for abstracting out common code.