JavaScript must be enabled in order to use this site.Please enable JavaScript in your browser and refresh the page. The Function Definition Statement Defines a new function that subsequently can be called within the current body of code. General Form resultType functionName(arguments) { statement1 statement2 … statementn } Example int SumList(int[] list) { int total = 0; foreach (int item in list) total += item; return total; } Print(SumList({5, -2, 4})); // Prints '7'. Print(SumList({1, 3, 4, 10, 6})); // Prints '24'. Parent topic: Statements