Skip to content

Commit f967978

Browse files
committed
Updated code listings.
1 parent d2454f8 commit f967978

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

listing-5.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ openDatabase()
2727
.then(db => {
2828
var query = { // Define our database query
2929
Year: {
30-
$gte: 2005, // Year >= 2005
30+
$gte: 2016, // Year >= 2016
3131
},
3232
};
33-
return db.collection.find(query) // Retreive records since the year 2005.
33+
return db.collection.find(query) // Retreive records since the year 2016.
3434
.toArray()
3535
.then(data => {
3636
console.log(data);

listing-7.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ openDatabase()
2727
.then(db => {
2828
return db.collection.find() // Retreive only specified fields.
2929
.sort({
30-
Precipitation: 1
30+
Year: 1
3131
})
3232
.toArray()
3333
.then(data => {

0 commit comments

Comments
 (0)