Data Types in TypeScript

In TypeScript, when declaring a variable, we must specify its type. To do this, we must write a colon after the variable name, and then specify the desired type.

For example, let's make a string variable:

typescriptlet test: string = 'abc';

And now the numerical one:

typescriptlet test: number = 123;

And now the logical one:

typescriptlet test: boolean = true;

It is not necessary to assign a value to a variable immediately when declaring it. You can first declare the variable, and then assign a value to it later in the code. Example:

typescriptlet test: string;
test = 'abc';
Задание 1

Make three variables: one string, one number, and one boolean.