Skip to content

Commit 7a5444f

Browse files
committed
DOCS-853 shorten sentences and change variable name
1 parent b5c42f9 commit 7a5444f

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

source/reference/method/cursor.toArray.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ cursor.toArray()
66

77
.. method:: cursor.toArray()
88

9-
The :method:`toArray() <cursor.toArray()>` method iterates a cursor
10-
completely to retrieve the documents and return these documents in
11-
an array. The :method:`toArray() <cursor.toArray()>` method loads
12-
into RAM all documents returned by the cursor and exhausts the
9+
The :method:`toArray() <cursor.toArray()>` method returns an array
10+
that contains all the documents from a cursor. The method loads all
11+
the documents returned by the cursor into RAM and exhausts the
1312
cursor.
1413

1514
:returns: An array of documents.
@@ -20,9 +19,9 @@ Consider the following example that applies :method:`toArray()
2019

2120
.. code-block:: javascript
2221

23-
var docArray = db.products.find().toArray();
22+
var allProductsArray = db.products.find().toArray();
2423

25-
if (docArray.length > 0) { printjson (docArray[0]); }
24+
if (allProductsArray.length > 0) { printjson (allProductsArray[0]); }
2625

27-
The variable ``docArray`` holds the array of documents returned by
26+
The variable ``allProductsArray`` holds the array of documents returned by
2827
:method:`toArray() <cursor.toArray()>`.

0 commit comments

Comments
 (0)