How to check the type of a variable or constant in TypeScript?
Originally Published Here ๐!
To check the type of a variable or a constant, you can use the typeof operator followed by the variable name in TypeScript. This is the same method used in the case of vanilla JavaScript code.
For example, let's say we h...
melvingeorge-me.hashnode.dev1 min read