Skip to content

Commit 07c5117

Browse files
authored
Update deleteMany.js
1 parent ad8676b commit 07c5117

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

source/code-snippets/usage-examples/deleteMany.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
// Delete multiple documents
22

3-
// Import the MongoClient type from the mongodb package.
43
import { MongoClient } from "mongodb";
54

65
// Replace the uri string with your MongoDB deployment's connection string.
76
const uri = "<connection string uri>";
87

9-
// Create a new client and connect to MongoDB.
108
const client = new MongoClient(uri);
119

1210
async function run() {
@@ -22,7 +20,7 @@ async function run() {
2220
// Print the number of deleted documents
2321
console.log("Deleted " + result.deletedCount + " documents");
2422
} finally {
25-
// Close the client after the operation completes
23+
// Close the connection after the operation completes
2624
await client.close();
2725
}
2826
}

0 commit comments

Comments
 (0)