1// Similar to languages like Java, void is used where there is no data.
2// For example, if a function does not return any value then you can
3// specify void as return type.
4function sayHi(): void {
5 console.log('Hi!')
6}
7
8let speech: void = sayHi();
9console.log(speech); //Output: undefined
10