Created by
First Browser War
Brendan Eich created in 10 days a working prototype of JavaScript for the Netscape Navigator Web browser. The original name was Mocha, after renamed LiveScript and finally - JavaScript
JavaScript was standardized by ECMA-262 Standard under the name ECMAScript
The Dark Ages
The only sparks are the joint endeavors which led to ActionScript, used in Adobe Flash Player platform.
Douglas Crockford introduced the JSON format
The Renaissance
Jesse James Garrett coins the term Ajax in his seminal paper Ajax: A New Approach to Web Applications
А bloom of JS open source projects and communities started: Prototype, jQuery, MooTools and many others
The JavaScript engine race starts
Initial release of Google's V8 (JavaScript engine). Used in many server-side JavaScript based projects
initial release of Node.js
AngularJS initial release.
Microsoft's TypeScript released
React.js initial release
Vue.js initial release
WebComponents Standard
EcmaScript 6 released
WebAssembly Web standard was introduced
Let the creator of JavaScript speak about its history:
New Features:
JavaScript is developed as a scripting language, which does not need to be compiled.
Contemporary JavaScript engines has compilation and optimization phases, but the developer does not need to carry about that.
class
keyword which is a syntactic sugar.class
as pure generalization.
var a;
a = 5;
a = "Howdy"; // no problem!
a = [1,2,3]; // no problem, again!
Primitive types are not objects!
console.log(typeof null); // "object" - A BUG, see bellow!
console.log(typeof true); // "boolean"
console.log(typeof undefined); // "undefined"
console.log(typeof 42); // "number"
console.log(typeof 'howdy'); // "string"
console.log(typeof Symbol()); // "symbol"
the 'typeof null' return "object" due to a bug in the first release in JavaScript 3
The primitive types boolean
, number
, string
and symbol
have corresponding object types (wrappers): Boolean
, Number
, String
and Symbol
Primitives do not have methods, but can borrow from their corresponding wrapper, when needed.
console.log( 3.141592653589793.toFixed(4) );
//3.1416
console.log( 'ada byron'.length );
//9
console.log( true.toString() );
//"true"
var ada = 'Ada';
console.log(ada); // 'Ada'
ada.surname = 'Byron';
console.log(ada.surname); // undefined
Objects are mutable!
var ada = {};
console.log(ada); //Object {}
ada.surname = 'Byron';
console.log(ada.surname); //Byron
function foo(){}
foo.id = 1
console.log(foo.id); // 1
let arr = ['a','b','c'];
arr.id = 1;
console.log(`arr.id: ${arr.id}`);
// arr.id: 1
let fruits = new Map();
fruits.set('banana', 1);
fruits.set('orange', 2);
fruits.set('meat', 4);
console.dir(fruits);
// Map { 'banana' => 1, 'orange' => 2, 'meat' => 4 }
let arr = ['a','b','c', 'b','a','b','c'];
console.dir(arr);
let uniqueValuesSet = new Set(arr);
console.dir(uniqueValuesSet);
//Set { 'a', 'b', 'c' }
These slides are based on
customised version of
framework