TypeScript

Variable Scope in TypeScript : Global, Local & function

The variables have a scope or visibility. The scope of a variable determines which part of the program can access it. We can define a variable in three ways, so as to limit their visibility. One is the local variable or block variable, which has the scope of a code block (block scope or local scope). The second one is a function variable or class variable which has the function/class scope. The last one is the global variable, which can be accessed anywhere in the program (global scope).

Variable Scope in TypeScript : Global, Local & function Read More »

Identifiers & Keywords in TypeScript

We must give a name to variables, functions, arrays, classes, interfaces, etc so as to identify them. Hence, typescripts call them as an Identifiers. We then use the identifier to refer to the variable, functions, etc elsewhere in the program. There are certain rules & restrictions that need to be followed when we name and identifier. Since the Typescript compiles to javascript. it follows all of the javascript naming rules. Also, the reserved keywords must not be used as an identifier name.

Identifiers & Keywords in TypeScript Read More »

Typescript Variable

A Typescript variable is a storage for the data, where programs can store value or information. We must give a name to the variable. We can then refer the variable in another part of the program. In this article, we learn how to declare a variable. Also, learn about the rules for naming the variable.

Typescript Variable Read More »

Scroll to Top