Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ceeb1c5

Browse files
Merge pull request #5 from mongodb-developer/update-create
Add consts
2 parents 97b176a + 4f5e1f2 commit ceeb1c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎create.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ main().catch(console.error);
6969
*/
7070
async function createListing(client, newListing){
7171
// See http://bit.ly/Node_InsertOne for the insertOne() docs
72-
result = await client.db("sample_airbnb").collection("listingsAndReviews").insertOne(newListing);
72+
constresult = await client.db("sample_airbnb").collection("listingsAndReviews").insertOne(newListing);
7373
console.log(`New listing created with the following id: ${result.insertedId}`);
7474
}
7575

@@ -80,7 +80,7 @@ async function createListing(client, newListing){
8080
*/
8181
async function createMultipleListings(client, newListings){
8282
// See http://bit.ly/Node_InsertMany for the insertMany() docs
83-
result = await client.db("sample_airbnb").collection("listingsAndReviews").insertMany(newListings);
83+
constresult = await client.db("sample_airbnb").collection("listingsAndReviews").insertMany(newListings);
8484

8585
console.log(`${result.insertedCount} new listing(s) created with the following id(s):`);
8686
console.log(result.insertedIds);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /