@@ -69,7 +69,7 @@ main().catch(console.error);
69
69
*/
70
70
async function createListing ( client , newListing ) {
71
71
// See http://bit.ly/Node_InsertOne for the insertOne() docs
72
- result = await client . db ( "sample_airbnb" ) . collection ( "listingsAndReviews" ) . insertOne ( newListing ) ;
72
+ const result = await client . db ( "sample_airbnb" ) . collection ( "listingsAndReviews" ) . insertOne ( newListing ) ;
73
73
console . log ( `New listing created with the following id: ${ result . insertedId } ` ) ;
74
74
}
75
75
@@ -80,7 +80,7 @@ async function createListing(client, newListing){
80
80
*/
81
81
async function createMultipleListings ( client , newListings ) {
82
82
// See http://bit.ly/Node_InsertMany for the insertMany() docs
83
- result = await client . db ( "sample_airbnb" ) . collection ( "listingsAndReviews" ) . insertMany ( newListings ) ;
83
+ const result = await client . db ( "sample_airbnb" ) . collection ( "listingsAndReviews" ) . insertMany ( newListings ) ;
84
84
85
85
console . log ( `${ result . insertedCount } new listing(s) created with the following id(s):` ) ;
86
86
console . log ( result . insertedIds ) ;
0 commit comments