I was quite curious about the fact that Typescript supports both any and unknown types which can be used to store any type of data without strict type checking. I had no Idea why there are two types for the same reason. I recently came to know their differences. Lets understand with below snippets.
![](https://blogs.snehasish-chakraborty.com/wp-content/uploads/2023/03/any-type.jpg)
![](https://blogs.snehasish-chakraborty.com/wp-content/uploads/2023/03/unknown-not-allowing-all-operation.jpg)
![](https://blogs.snehasish-chakraborty.com/wp-content/uploads/2023/03/type-narrowing-with-unknown.jpg)
Photo by Chien Nguyen Minh on Unsplash