You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 8, 2020. It is now read-only.
I use ES6 because it gives me easy-to-code classes and because the last line is always returned in arrow functions (which is great for promise chaining). You do not have to use ES6, and should not refactor into it 'just because'.
5
+
6
+
### How To Read
7
+
8
+
**Javascript:**
9
+
```js
10
+
function( x, y, z ){
11
+
return z
12
+
}
13
+
14
+
functionx(z) {
15
+
// constructor
16
+
this.y= z;
17
+
}
18
+
x.prototype.method=function(){}
19
+
```
20
+
**ES6**
21
+
```js
22
+
// `this` is bound to OUTER scope
23
+
( x, y, z ) => {
24
+
this.whatever;
25
+
}
26
+
// single-line functions without brackets returns their expression
27
+
( x ) =>x.y
28
+
// single-argument signatures don't need parenthesis
0 commit comments