Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
doc: replace var by const in modules.md
  • Loading branch information
vsemozhetbyt committed Apr 5, 2017
commit f00cef55aaeacd97c0bf1e445b8189836440b223
4 changes: 2 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Below, `bar.js` makes use of the `square` module, which exports a constructor:

```js
const square = require('./square.js');
var mySquare = square(2);
const mySquare = square(2);
console.log(`The area of my square is ${mySquare.area()}`);
```

Expand Down Expand Up @@ -566,7 +566,7 @@ To illustrate the behavior, imagine this hypothetical implementation of

```js
function require(...) {
var module = { exports: {} };
const module = { exports: {} };
((module, exports) => {
// Your module code here. In this example, define a function.
function some_func() {};
Expand Down