the JavaScript compiler. For mongo may convert 1+1 to 2 or remove comments. The actual changes affect only the appearance of the code and will vary based on the version of JavaScript used but will not affect the semantics of the code. 

## Exit the Shell 

To exit the shell, type quit() or use the <Ctrl-c> shortcut. 

See also: 

Getting Started Guide 109 

## Access the mongo Shell Help Information 

In addition to the documentation in the MongoDB Manual , the mongo shell provides some additional information in its “online” help system. This document provides an overview of accessing this help information. 

See also: 

• mongo Manual Page 

• MongoDB Scripting (page 265), and 

• mongo Shell Quick Reference (page 278). 

## Command Line Help 

To see the list of options and help for starting the mongo shell, use the --help option from the command line: 

mongo --help 

## Shell Help 

To see the list of help, in the mongo shell, type help : 

help 

## Database Help 

• To see the list of databases on the server, use the show dbs command: 

show dbs 

New in version 2.4: show databases is now an alias for show dbs 

• To see the list of help for methods you can use on the db object, call the db.help() method: 

db.help() 

• To see the implementation of a method in the shell, type the db.<method name> without the parenthesis ( () ), as in the following example which will return the implementation of the method db.updateUser() : 

