MongoDB indexing exercise.
Ready — edit the code above and click Run.
db.products.createIndex({ price: 1 });
Try solving on your own first, then reveal the official answer.
MongoDB shell syntax for interviews.