how to print more than 20 documents mongo shell

JavaScript
DBQuery.shellBatchSize = 300db.collection.find().toArray()
Source

Also in JavaScript: