function hello(name:String){
println("Hello, {name}!");
}
To call it, use:
hello("Lady Gaga");Other samples:
function add(x:Integer,y:Integer){
println("Add: {x} + {y} = {x+y}");
}
function add(x:Integer,y:Integer){
return x+y;
}GMgKe586q6suSQnyqZLlGCooeWM
No comments:
Post a Comment