doc: replace functions with arrow functions

PR-URL: https://github.com/nodejs/node/pull/6203
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
abouthiroppy authored and James M Snell committed 2016-04-26 12:16:17 -07:00
1 parent 28baed9c0f
commit 6178ec2192
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -410,7 +410,7 @@ allowable type. For example, passing a function to a parameter which expects a
string would be considered a TypeError.
```js
require('url').parse(function() { });
require('url').parse(() => { });
// throws TypeError, since it expected a string
```
+1 -1
View File
@@ -222,7 +222,7 @@ context. The primary use case is to get access to the V8 debug object:
```js
const Debug = vm.runInDebugContext('Debug');
Debug.scripts().forEach(function(script) { console.log(script.name); });
Debug.scripts().forEach((script) => { console.log(script.name); });
```
Note that the debug context and object are intrinsically tied to V8's debugger