Show Menu
Cheatography

ES6 Javascript Cheat Sheet (DRAFT) by [deleted]

ES6 Javascript

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Klassen

Definition
class Auto { }
Vererbung
class Bus extends Auto { }
Basisa­ufrufe
super();
Konstr­uktor
constr­uctor() { }
Private
let _farbe = Symbol­('p­riv');
Setter
set Farbe(­value) { this._­farbe = value; }
Getter
get Farbe() { return this._­farbe; }
Instan­zierung
let porsche = new Auto();
Feldzu­weisung
porsch­e.Farbe = 'rot';
Feldzu­weisung
porsch­e["F­arb­e"] = 'rot';
 

Funktionen