[TypeScript] TypeScript Grammar - 01
·
Development Study/Frontend
1. Type Annotation TypeScript uses colon ( : ) behind variables to annotate a type const myMaxHamburger: number = 3; const answer: string = "Yes I can"; const drinks: boolean = true; You can code like variable: It is essential to write this annotation, so be careful to pass by this 1_01. Type Declaration_string let str: string; let red: string = 'Red'; let green: string = 'Green'; let myColor: s..