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
Copy file name to clipboardExpand all lines: week2/README.md
+19-3Lines changed: 19 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,20 @@ Chocolate cake for the person who can succeed the most tests :) (prices will hav
24
24
25
25
### Something about ES6 I want you guys to know
26
26
Old guys like Joost, Erol and I are talking about this "ES6" all the time. ES6 basically means: the latest version of NodeJS. It's a lot of really nice new features. For you guys, you should remember the following
27
-
> During the NodeJS course, we will teach you some ES6 features, like Fat Arrow. It's *extremely* important to know whether a function comes from ES6 or from an older version of JavaScript. Why? [Because browsers don't support every new feature just yet](http://kangax.github.io/compat-table/es6/). NodeJS, on the other hand, you can always control which version of Javascript is running, because it's running on your computer, not in the browser. Version 6.x that you are running supports most ES6.
27
+
> During the NodeJS course, we will teach you some ES6 features, like Fat Arrow. It's *extremely* important to know whether a function comes from ES6 or from an older version of JavaScript. Why? [Because browsers don't support every new feature just yet](http://kangax.github.io/compat-table/es6/). With Node, on the other hand, you can always control which version of Javascript is running, because it's running on your computer, not in the browser. Node Version 6.x that you are running supports most ES6.
28
+
So in summary: if you're working on the frontend, you probably don't want to use es6 just yet. In backend, type node --version to see which version you are running, and make sure everyone on the team has the same version by adding "engine" to `package.json` like so:
29
+
30
+
```
31
+
"dependencies": {
32
+
...
33
+
},
34
+
"devDependencies": {
35
+
...
36
+
},
37
+
"engines": {
38
+
"node": ">=6.5.0" // this means you need 6.5 or higher
39
+
},
40
+
```
28
41
29
42
### 1. ES6: Fat Arrow functions
30
43
This is one example of how ES6 can help us write cleaner code. I'm adding this as first reading material because it's used a lot on the NodeJS documentation website, so it's a good idea to understand what this means. Bonus points if you write your callbacks this way.
@@ -42,5 +55,8 @@ Only read the part about readFile, appendFile (you will need this in your assign
0 commit comments