.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'); // trueLast updated
Was this helpful?