What are the variables in typescript? How to create a variable in typescript?



What are the variables in typescript? How to create a variable in typescript?..

Answer / Shakti Singh Chauhan

In TypeScript, variables are containers for storing data values. To create a variable, declare its type and assign a value: `let variableName: dataType = value;` For example, `let myVariable: number = 10;`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More TypeScript Interview Questions

What is typescript? How is it different from javascript?

1 Answers  


What is the use of the tsconfig.json file in typescript?

1 Answers  


What is the difference between "interface vs type" statements?

1 Answers  


What is anonymous functions?

1 Answers  


What are modules in typescript?

1 Answers  


What is jsx? Can we use jsx in typescript?

1 Answers  


What is declaration merging?

1 Answers  


Which object oriented terms are supported by typescript?

1 Answers  


How to call base class constructor from child class in typescript?

1 Answers  


Who developed typescript?

1 Answers  


Why are optional parameters added in typescript?

1 Answers  


What is functions in typescript?

1 Answers  


Categories