1.

How Typescript Is Optionally Statically Typed Language?

Answer»

TYPESCRIPT is referred as optionally statically typed, which means you can ask the compiler to IGNORE the type of a variable. USING any data type, we can assign any type of value to the variable. TypeScript will not give any ERROR checking during compilation.

VAR unknownType: any = 4;
unknownType = "Okay, I am a string";
unknownType = false; // A boolean.

TypeScript is referred as optionally statically typed, which means you can ask the compiler to ignore the type of a variable. Using any data type, we can assign any type of value to the variable. TypeScript will not give any error checking during compilation.

var unknownType: any = 4;
unknownType = "Okay, I am a string";
unknownType = false; // A boolean.



Discussion

No Comment Found