Type Script Vs JavaScript

Type Script Vs JavaScript

Many might know that JavaScript and Typescript are two different things. But the details of the difference are the ones most of us are not sure about. To put in simple words JavaScript is a scripting language that used to develop interactive web pages. Typescript on the other hand is a superset of JavaScript. But this is the main difference that anyone can recognize on the crust level. There is a lot more if we dig deep. In this article we will see some of the key differences between Typescript and JavaScript. 

What Is JavaScript?

JavaScript is a scripting language that is used to build or develop interactive web pages.  It runs in the web browser without the requirement of any resources. It is not just confined to browsers. It can also run on other technologies like REST APIs, XML and more. The main motive for developing JavaScript is to position itself as a complementing scripting language. More like how Visual Basic acted to C++ in the Microsoft programming language ecosystem. It was not developed for complex applications. But it is  the best for the ones with a light load. 

What is Typescript?

Typescript is a very modern age language that is used for JavaScript development. It is used to smile and a clear java code. It is also statistically compiled. It has no restrictions when it comes to browsers. The only requirement is that the browser should support ECMAscript 3 or any newer version for that matter. Typescript supports interface, optional typing and classes. 

One of the biggest advantages that the type script brings in is that the JavaScript project adopting Typescript has the capability to render robust projects. These help in easy deployment in the JavaScript application. 

Reasons To Choose JavaScript :

There are a wide range of reasons to choose JavaScript. Some of them include

  • It is specially designed for small scripts
  • It is open source
  • It has Microsoft’s Patronage
  • It runs in almost all the browsers
  • Supports classes, interfaces & modules
  • Cross compilation
  • If required it can be extended to develop large applications

It is nothing less than a wholesome package for developing interactive web pages. The features that are mentioned above are all the more enough. And it is because of this many JavaScripts play a very important role in front end development. 

Why Choose Typescripts?

Typescripts pose a lot of advantages. There are some considerable number of aspects about typescripts to choose them over the rest. Some of them are

  • The support that typescript renders to JS libraries and API documentation
  • It is a superset of JavaScript
  • There is an option to convert typescript code to plain JavaScript code. 
  • The language is optionally types
  • The code structuring is comparatively better
  • The programming techniques are object oriented
  • If there is a necessity the language extended beyond the standard decorators.

JavaScript History :

 JavaScript was created by Brendan Eich who was the programmer in Netscape Communications. Its sole purpose was to work as a Netscape Navigator. Later it became a very popular scripting tool.  A few years later it was called LiveScript. Later on it was renamed as JavaScript so that it can reflect Netscape’s support of JavaScript in its internal browser. 

Everyone should know that things did not happen overnight. JavaScript was launched in the year 1995. You will be surprised that it just took ten days to develop it. In 1996 Netscape submitted JavaScript to ECMA (European Computer Manufacturers Association) ECMAScript 2 and ECMAscript 3 were released in the year 1998 and 1999 accordingly. In the year 2005 tow big names Mozilla and Eich joined ECMA. With an aim to define a common standard library, Common JS project was launched in 2009.ECMA script 5.1 was launched in 2011 and ECMAscript 2016 was launched in 2015. The current script 2017 was launched in 2017.

History of Type Scripts :

Typescript first hit the markets in the year 2012. In the year 2013 Typescript 0.9 was released by Microsoft. At Build 2014 additional support for generic Typescript 1.0 was released. The second version of typescript compiler was launched in July 2014. It was five times faster than the old version. Support for ES 6 was released in July 2015. Features like key and lookup were added in November 2016. In March 2018 support for conditional types, and intersection types came in. 

Features of JavaScripts :

  • It is a Cross-Platform language
  • Can be used for both client side and server side
  • Easy to learn
  • It is dynamic and flexible
  • No restrictions in most of the aspects
  • Ensures strong work flow
  • Wide options for frameworks

Features of Typescript :

  • Easy maintenance
  • High productivity for developers
  • Code navigation and bug prevention
  • Wide range of features for functions
  • Supports ES6