A function is a set of statements that perform a specific task and used to create readable, maintainable and re-usable code.
A function declaration tells to compiler about a function name, return type, and parameters.
Stayed Informed – Learn Angular 2 with TypeScript
Different types of functions are available in the TypeScript i.e.
5. Class Function
Named Function -
var addNum = (n1: number, n2: number) => n1 + n2;
(n1: number, n2: number)