Google News
logo
TypeScript - Interview Questions
What are the different ways of declaring a Variable?
There are four ways of declaring a variable :
var [identifier] : [type-annotation] = value; //Declaring type and value in a single statement

var [identifier] : [type-annotation]; //Declaring type without value

var [identifier] = value; //Declaring its value without type

var [identifier]; //Declaring without value and type
Advertisement