Identifiers are names given to functions, variables, classes, etc., that we can use to refer to them.
In TypeScript, we do not just name variables using any name. Rather, we follow some rules that guide naming in Typescript, which is similar to JavaScript.
_
or $
sign, e.g., full_name
.any
or for
.Keywords are a predefined set of reserved words that have special meaning in a program.
Examples of keywords in Typescript include the following:
break
,as
,any
,switch
case
,if
,throw
,else
,var
,number
,string
,get
,module
,type
,instanceof
,typeof
,public
,private
,enum
,export
,finally
,for
,while
,void
,null
,super
,this
,new
,in
,return
,true
,false
,any
,extends
,static
,let
,package
,implements
,interface
,function
,new
,try
,yield
,const
,continue
,do
,catch
Many others are words reserved in TypeScript.
Typescript ignores indentation and whitespace. However, you can add them to make your code look more readable.