December 2017
Beginner
372 pages
10h 32m
English
ES5 is the most popular JavaScript version supported in browsers, and if you are developing an application that has to support the majority of browser versions, then you need to transpile your code to the ES5 version. This version of JavaScript does not have classes, and hence the transpiled code converts classes to functions, and methods inside the classes are converted to prototypically defined methods on the functions.
The following is the code transpiled when we have the target set as ES5 in the TypeScript compiler options:

As discussed earlier, the basic difference is that the class is converted to a function. The interesting ...
Read now
Unlock full access