function return voidtypescript code example
Example: void in ts
// Similar to languages like Java, void is used where there is no data.
// For example, if a function does not return any value then you can
// specify void as return type.
function sayHi(): void {
console.log('Hi!')
}
let speech: void = sayHi();
console.log(speech); //Output: undefined