![]() |
In TypeScript, any type is very powerful and it can be used to represent any type of value. It is used to take the variable out from the static typing in TypeScript and allows it to store a value of any kind of data type available in TypeScript. The use of any keyword to type variables is not recommended as it does not favor strong type checking and makes the TypeScript code loosely typed just like Vanilla JavaScript. Syntax:const variavleName: any = valueOfAnyDataType. Example: The below code will explain the use of any type in TypeScript.
Output: Number Type Value: 2009 |
Reffered: https://www.geeksforgeeks.org
JavaScript |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |