.deleteCollection()

Deletes a collection.

deleteCollection(name)

Parameter

Description

name

String

The name of the collection

Returns

Description

Whether the collection was successfully deleted or not

db.deleteCollection('users'); // true

Last updated