December 2017
Beginner
372 pages
10h 32m
English
Functions are the building blocks of the JavaScript programming language, which allow us to write readable, maintainable, and reusable code. Functions define the action to be performed. If you have done any JavaScript development you would have written functions. TypeScript functions are not very different from JavaScript functions, with the addition of some new features that allow us to write code that is more understandable and error-free.
Here is an example of how a TypeScript function is defined:
function printFullName(firstName:string,lastName:string):string{ return firstName + " " + lastName;}
This example shows how a function is defined in TypeScript. We have a function keyword, which is prefixed to the function name, followed ...
Read now
Unlock full access