What is the difference between TypeScript and JavaScript?
S.no | TypeScript | JavaScript |
---|---|---|
1. | Typescript is an object-oriented language. | JavaScript is a scripting language. |
2. | Static typing feature is available here. | Doesn’t support static typing. |
3. | TypeScript supports modules. | JavaScript doesn’t support modules. |
4. | It has an interface. | Doesn’t have any interface. |
5. | The optional parameter function is supported here. | JavaScript doesn’t support optional parameter function. |
BY Best Interview Question ON 05 Mar 2020