.deleteCollection()
Deletes a collection.
deleteCollection(name)
Parameter
Description
name
The name of the collection
Returns
Description
Whether the collection was successfully deleted or not
db.deleteCollection('users'); // true
Last updated
Was this helpful?