Skip to content

Type Annotations

Video Lecture

Type Annotations Type Annotations

Sample Code

1
2
3
4
5
6
7
function foo(bar: string) {
    return 'Hello, ' + bar
}

let baz: string = 'ABC'

console.log(foo(baz))