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. TypeScript functions are almost similar to JavaScript functions but there are different ways of writing functions in TypeScript. Stayed Informed – Learn Angular 2 with TypeScript Different types of functions are available in the TypeScript i.e. 1. Normal function 2. Anonymous Function 3. Named Function 4. Lambda Function/Arrow Function 5. Class Function 6. Optional Parameters 7. Rest Parameters 8. Default Parameters Anonymous Function s– An anonymous function is a function that was declared without any named identifier to ref...
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers