Dashboard
Repositories
filestore
Aktivität
Suche
Login
public
/
web-development/examples
Web Development Examples
Übersicht
Reflog
Commits
Dateibaum
Dokumentation
Forks
Vergleichen
Blame
|
Historie
|
Raw
add js examples for oop and asynchronicity
Sascha Schulz
2023-05-09
0539670917d0aeb39caa988aa1fe05c8a0104dab
[public/web-development/examples.git]
/
templates
/
007-js
/
constructors-es6.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Rectangle {
constructor(a, b) {
this.a = a;
this.b = b;
}
getArea() {
return this.a * this.b;
}
}
const r = new Rectangle(2, 3);
console.log(r.getArea());