How to declare variable in typescript?



How to declare variable in typescript?..

Answer / Chandra Mohan Agrawal

To declare a variable in TypeScript, you start by defining its type followed by the variable name. For example: let myVariable: string = 'Sample Value';

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More TypeScript Interview Questions

What are the data types in typescript?

1 Answers  


What is rest parameters functions?

1 Answers  


What are the types of typescript?

1 Answers  


How to implement inheritance in typescript?

1 Answers  


Which are the different data types supported by typescript?

1 Answers  


Is es6 typescript?

1 Answers  


Explain decorators in typescript? List type of decorators available in typescript?

1 Answers  


What are disadvantages of typescript?

1 Answers  


What is components in typescript?

1 Answers  


How to declare variable in typescript?

1 Answers  


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

1 Answers  


What do you understand by classes in typescript?

1 Answers  


Categories