JavaScript, Typescript, ES6 differences and relationships

TypeScript project development and JavaScript is the more popular of the two scripting languages.

 Source: www.yinxiangit.com

JavaScript is a lightweight, interpreted scripting language that can be embedded into HTML pages, executed on the browser. The TypeScript is a superset of JavaScript, that contains all the elements of JavaScript, JavaScript code can run, and extends the syntax of JavaScript. Compared to JavaScript, it also adds features static typing, classes, modules, interfaces, and type annotation terms, easier to develop large projects.

 

TypeScript Javascript is a superset of, be implemented in object-oriented programming is the way to use Javascript. Finally, of course code or compiled to Javascript.

 

TypeScript which provides features:

TypeScript improvement relative to the ES5 there are five:

  1. Types of
  2. class
  3. annotation
  4. Import module
  5. Language Toolkit (for example, structure)

 

 

TypeScript advantages compared to JavaScript summarized as follows:

 

1. easy for developers to make a comment.

 

2. can help developers detect errors and modifications.

 

3.TypeScript tools make refactoring becomes more easy and fast.

 

4.TypeScript introduced the "class" concept in JavaScript does not have.

 

5.TypeScript introduced the concept of modules, can be declared, data, functions and classes in the package module.

 

6 .. Type-safe function can detect an error during encoding, which creates a more efficient coding and debugging for developers

 

What is ES6

 

ECMAScript 6.0 (hereinafter referred to as ES6) is the JavaScript language (ES5 now is to follow the standard) next-generation standard, has been officially released in June 2015. Its goal is to enable JavaScript language can be used to write large complex applications, enterprise-class development language.

 

ECMAScript and JavaScript relations:

 

As the creator of JavaScript Netscae's copyright issues, ECMAScript not be called Javascript. In short, the relationship between ECMAScript and JavaScript is that the former is the latter specification (language specification), which is a former achieved.

 

TypeScript and ES6 relationship:

 

TypeScript is a superset of the ES6. As for the use or need, you need that scene. For example, in Angular2 in with TypeScript significantly better than ES6.

 

ES6 is standard Javascript language, typescript is a superset of the ES6, Angular2 is based on JS framework to develop the typescript.

Guess you like

Origin www.cnblogs.com/bingerger/p/11516772.html