| Ten most common difference between Javascript and Typescript
Below are the 10 most common difference between JavaScript and TypeScript
(1)First Release
(i)Javascript was developed by the Netscape in year 1995
(ii)Typescript comes into picture in year 2012 and devloped by Anders Hejlsberg
(2)File Extension
(i)Javascript file name is end with ".js" extension
(ii)Typescript file name is end with ".ts" extension
(3)Support of ES6
(i)Javascript will not support ES6
(ii)Typescript will supports ES6
(4)strongly Type
(i)Javascript will not support strongly typed or statuc typing
(ii)Typescript supports strongly types or static typing feature
(5)OOPS Concept
(i)Javascript is just a scripting language
(ii)Typescript supports OOPS concepts like interfaces, classes, inheritance and generics etc.
(6)Optional Parameter
(i)Javascript have no such things like optional parameter.
(ii)Typescript has the optional parameter feature
(7)Modules
(i)Javascript will not support modules
(ii)Typescript will support modules.
(8)Variable Support
(i)Javascript number and strings are treated as objects
(ii)Typescript number and string are used by interface
(9)Generics
(i)In javascript we cannot have generics support
(ii)Typescript supports generics
(10)Compile
(i)javscript is interpreted language so it will produce error at runtime
(ii)On the other hand Typescript code and highlighted errors during the development time. | | |