type annotation
// โญ๏ธ type annotation
// โญโโโโโโโฎ
let myName: string = "Alice"; // on variable
// โญโโโโโโโฎ
function greet(name: string) { log(name) } // on parameter
// โญโโโโโโโฎ
function twentySix(): number { return 26; } // on return type
๐ Type Annotations
Last updated