HomeTracks
Explorer···
THEEBUG
Completed0/6
Score0
JSlesson4.js×
THEEBUGlesson4.js
1
await users.updateOne({ name: "Ada" }, { ______: { age: 31 } });
$[system] Theebug ready. Happy coding!
Code BlocksDrag blocks into the drop zones above
4 blocks available
$set
set
$update
$replace
Game Panel
0:000 pts
Level 4 of 6Updating Documents
0/1 slots correct
Objective
Update Ada's age to 31 using the correct update operator
Expected Output
{ acknowledged: true, modifiedCount: 1 }
Debug says:
updateOne takes a filter (which document) and an update operator (what to change) — passing a plain object without an operator is actually a MongoDB error. Which operator changes just the fields you list, leaving everything else untouched?
Debug the Worm