Languages
[Edit]
EN

TypeScript - primitive types

3 points
Created by:
evangeline
420

In TypeScript there are available following primitive types.

1. number type example

Edit

Output:

2. string type example

Edit

Output:

3. boolean type example

Edit

Output:

4. void type example

Edit

Note: this type is useful with functions. It is possible to create variable with void type (let value : void = null) but it allows later to assign only null or undefined.

5. any type example

Edit

Output:

Note: with this type we can assign anything to variable. It shouldn't be used if it is not necessary.

 

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

TypeScript

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join