December 2017
Beginner
372 pages
10h 32m
English
The void keyword is used to represent a scenario where there is no type. This is useful in the case of functions that do not return any value. These functions are annotated with void as a return type. In the following example, the doSomething function does not return any value, and hence has a void as return type:
function doSomething(num: number):void{ console.log(num);}
Read now
Unlock full access