Introduction
What is a function?
What is a function and what does it do? Functions are used by your computer to do tasks.‌
All functions have a common declaration method:
Type FunctionName(InputType InputVariable1, InputType InputVariable2...)
{
//code to run in the function
}‌
When runing a function use this method:
FunctionName();
Type refers to what kind of data the function returns when run. FunctionName is what you call your function. InputVariableN is where you input the data, in variable form, that the function needs to run InputType refers to the type of variable the function needs
you can also use the extended declaration to include data (numbers, text etc.)
type name = data;
Last updated
Was this helpful?