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
Prev Previous commit
Next Next commit
doc: use exponentiation operator in modules.md
  • Loading branch information
vsemozhetbyt committed Apr 7, 2017
commit 659a802368150f1d2d55c3aa745e0405b6c07d77
4 changes: 2 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Here are the contents of `circle.js`:
```js
const { PI } = Math;

exports.area = (r) => PI * r * r;
exports.area = (r) => PI * r ** 2;

exports.circumference = (r) => 2 * PI * r;
```
Expand Down Expand Up @@ -54,7 +54,7 @@ The `square` module is defined in `square.js`:
// assigning to exports will not modify module, must use module.exports
module.exports = (width) => {
return {
area: () => width * width
area: () => width ** 2
};
};
```
Expand Down