mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Adding 'by' to the documentation.
This commit is contained in:
parent
f121558668
commit
526af777d4
2 changed files with 19 additions and 1 deletions
|
@ -545,6 +545,11 @@ coffee --bare --print --stdio</pre>
|
|||
by adding a meaningful return value, like <tt>true</tt>, or <tt>null</tt>,
|
||||
to the bottom of your function.
|
||||
</p>
|
||||
<p>
|
||||
To step through a range comprehension in fixed-size chunks,
|
||||
use <tt>by</tt>, for example:<br />
|
||||
<tt>evens = (x for x in [0..10] by 2)</tt>
|
||||
</p>
|
||||
<p>
|
||||
Comprehensions can also be used to iterate over the keys and values in
|
||||
an object. Use <tt>of</tt> to signal comprehension over the properties of
|
||||
|
|
15
index.html
15
index.html
|
@ -239,7 +239,7 @@ cubes = (function() {
|
|||
</p>
|
||||
|
||||
<p>
|
||||
To install, first make sure you have a working copy of the latest tagged version of
|
||||
To install, first make sure you have a working copy of the latest stable version of
|
||||
<a href="http://nodejs.org/">Node.js</a>, and <a href="http://npmjs.org">NPM</a>
|
||||
(the Node Package Manager). You can then install CoffeeScript with NPM:
|
||||
</p>
|
||||
|
@ -365,6 +365,14 @@ Expressions
|
|||
Value "x"</pre>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>--nodejs</code></td>
|
||||
<td>
|
||||
The <tt>node</tt> executable has some useful options you can set,
|
||||
such as <tt>--debug</tt> and <tt>--max-stack-size</tt>. Use this
|
||||
flag to forward options directly to Node.js.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
|
@ -913,6 +921,11 @@ countdown = (function() {
|
|||
by adding a meaningful return value, like <tt>true</tt>, or <tt>null</tt>,
|
||||
to the bottom of your function.
|
||||
</p>
|
||||
<p>
|
||||
To step through a range comprehension in fixed-size chunks,
|
||||
use <tt>by</tt>, for example:<br />
|
||||
<tt>evens = (x for x in [0..10] by 2)</tt>
|
||||
</p>
|
||||
<p>
|
||||
Comprehensions can also be used to iterate over the keys and values in
|
||||
an object. Use <tt>of</tt> to signal comprehension over the properties of
|
||||
|
|
Loading…
Add table
Reference in a new issue