Question: Which code example completes this statement and creates an index for a MongoDB object named restaurants, sorted ascending by the field name?

  1. `const results = yield db.table('restaurants').createIndex({"name": 1}, null); return results;`
  2. `const results = yield db.collection('restaurants').createIndex({"name": 0}, null); return results;`
  3. `const results = yield db.collection('restaurants').createIndex({"name": 1}, null); return results;`
  4. `const results = yield db.table('restaurants').createIndex({"name": 0}, null); return results;`

Answer: The correct answer of the above question is Option C:`const results = yield db.collection('restaurants').createIndex({"name": 1}, null); return results;`