Empty function result in TypeScript
There are functions that return nothing. In this case, the keyword void is specified as the result. See the example:
typescriptfunction func(test: string): void {
alert(test);
}
Задание 1
Specify the return type:
typescriptfunction func(text: string) {
console.log(elem);
}