How to add a string type annotation to a variable or a constant in TypeScript?
Originally Published Here ๐!
To add a string type annotation to a variable or a constant, you can declare the variable or constant followed by a : (colon) symbol and then the type string in TypeScript.
For example, let's say we have a variable calle...
melvingeorge-me.hashnode.dev2 min read