Skip to content

Commit 8e7b33c

Browse files
committed
remove the general javascript variable arguments per scott's comment
1 parent 038f319 commit 8e7b33c

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

source/reference/method/cursor.forEach.txt

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,7 @@ cursor.forEach()
1616

1717
JavaScript function to apply to each document from the
1818
cursor. The ``<function>`` signature includes a single argument
19-
that is passed the current document to process, as in the
20-
following prototype:
21-
22-
.. code-block:: javascript
23-
24-
function(doc) {
25-
...
26-
}
27-
28-
However, if the signature is missing the argument, you can
29-
access the document using the reserved
30-
``arguments`` [#arguments]_ variable within the function,
31-
specifically ``arguments[0]``, as in the following prototype:
32-
33-
.. code-block:: javascript
34-
35-
function() {
36-
doc = arguments[0];
37-
...
38-
}
39-
40-
.. [#arguments] The ``arguments`` variable is an array
41-
and thus, you can access ``arguments.length`` attribute to
42-
determine the number of arguments.
19+
that is passed the current document to process.
4320

4421
The following example invokes the :method:`~cursor.forEach()` method
4522
on the cursor returned by :method:`~db.collection.find()` to print

0 commit comments

Comments
 (0)