JavaScript - studiofu/brain GitHub Wiki

QuickStart

Version

ES5 vs ES2015 (ES6) vs Typescript

ES5 is the standard of javascript from 2009

ES2015 is a big improvement and it is standardized on 2016, some features are

classes let + const, etc… please refer to https://medium.com/@madasamy/javascript-brief-history-and-ecmascript-es6-es7-es8-features-673973394df4

demo programs

https://github.com/quantificial/demo-javascript

Class in JavaScript

function Programmer() {
}

Programmer.create = function() {
  console.log('Programmer.create');
  return new Programmer();
};

Programmer.prototype.code = function() {
  console.log('Programmer.code');
  return 'Hello World';
};

const morgan = Programmer.create();
morgan.code();