MongoDB Interview Question

Rewrite a section of code