Typescript vs Javascript. What's the difference

Typescript vs Javascript. What's the difference

Comparision between Typescripts and Javascript

Javascript is a scripting language. It has been there since 1995. It was created by Netscape Communications Corporation programmer called Brendan Eich. Intention was to use Javascript for small projects.

Typescript is a modern age Javascript development language. Microsoft created that in 2012. Actually typescript is a superset of Javascript. What does that mean is Typescript has all the Javascript features and much more.

Key Difference

  • Typescript code needs to be compile while Javascript code doesn’t need to compile
  • Typescript supports the feature of prototyping. Javascript doesn’t support this feature.
  • Typescript uses concepts like Types, Interfaces to describe the data being used. Javascript doesn’t have that concept.
  • Typescript is ideal for larger projects whereas Javascript is ideal for smaller projects.

Now let’s compare the feature of each one.

Features of Javascript

  • Dynamic language. It’s fleixble and powerful.
  • Strong testing workflow
  • Smaller learning curve.
  • It’s use for both client side and server

Features of Typescript

  • Easy to maintain
  • Improve developers productivity.
  • Optional static type annotation / Static typing
  • Additional features for functions
  • Support ES6
  • Supports interfaces, sub-interfaces, classes & sub-classes

Which one is better ?

It depends on the situation. If an experienced developer working on a smaller project Javascript is ideal. But if you have knowledge and expertise development team, then Typescript is more suitable.


© 2020. All rights reserved.