Skip to content

Commit

Permalink
Correct reference to // division, per coffeescript6/discuss#39 (com…
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoffreyBooth committed Dec 11, 2017
1 parent ffd966f commit 97d6ef4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/v2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,7 @@ <h2>Operators and Aliases</h2>
<p>As a shortcut for <code>this.property</code>, you can use <code>@property</code>.</p>
<p>You can use <code>in</code> to test for array presence, and <code>of</code> to test for JavaScript object-key presence.</p>
<p>In a <code>for</code> loop, <code>from</code> compiles to the <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of">ES2015 <code>of</code></a>. (Yes, it’s unfortunate; the CoffeeScript <code>of</code> predates the ES2015 <code>of</code>.)</p>
<p>To simplify math expressions, <code>**</code> can be used for exponentiation and <code>//</code> performs integer division. <code>%</code> works just like in JavaScript, while <code>%%</code> provides <a href="https://en.wikipedia.org/wiki/Modulo_operation">“dividend dependent modulo”</a>:</p>
<p>To simplify math expressions, <code>**</code> can be used for exponentiation and <code>//</code> performs floor division. <code>%</code> works just like in JavaScript, while <code>%%</code> provides <a href="https://en.wikipedia.org/wiki/Modulo_operation">“dividend dependent modulo”</a>:</p>
<aside class="code-example container-fluid bg-ribbed-dark" data-example="modulo">
<div class="row">
<div class="col-md-6 coffeescript-input-column">
Expand Down
2 changes: 1 addition & 1 deletion documentation/sections/operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ You can use `in` to test for array presence, and `of` to test for JavaScript obj

In a `for` loop, `from` compiles to the [ES2015 `of`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of). (Yes, it’s unfortunate; the CoffeeScript `of` predates the ES2015 `of`.)

To simplify math expressions, `**` can be used for exponentiation and `//` performs integer division. `%` works just like in JavaScript, while `%%` provides [“dividend dependent modulo”](https://en.wikipedia.org/wiki/Modulo_operation):
To simplify math expressions, `**` can be used for exponentiation and `//` performs floor division. `%` works just like in JavaScript, while `%%` provides [“dividend dependent modulo”](https://en.wikipedia.org/wiki/Modulo_operation):

```
codeFor('modulo')
Expand Down

0 comments on commit 97d6ef4

Please sign in to comment.