scrimba
Introduction to TypeScript
TypeScript: Return Types
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

AboutCommentsNotes
TypeScript: Return Types
Expand for more info
index.ts
run
preview
console
import { Person } from './person.model';

function add(val1: number, val2: number) {
return val1 + val2;
}

function sayHello(person: Person) {
return `Say Hello to My Little Friend, ${person.firstName}!`
}

function voidExample() {
add(1,2);
}

function neverExample(){

}
Console
index.html
-2:56