Sail E0 Webinar
Question
You’d like a set of documents to be returned in last name, ascending order
Options:
A .  db.persons.find().sort({lastName: -1}}
B .  db.persons.find().sort({lastName: 1}}
C .  db.persons.find().sort({lastName: ascending}}
D .  db.persons.find().sort({lastName: $asc}}
Answer: Option B

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers