Tsallaka zuwa abun ciki
Justice Tech School

Logical Operators

$and, $or, $nor and $not combine conditions.

Example
db.users.find({ $or: [{ age: 22 }, { name: "Ada" }] })
db.users.find({ $and: [{ age: { $gt: 20 } }, { age: { $lt: 30 } }] })

Exercise

Either condition.

{ : [a, b] }

Quiz Test

Which needs both conditions?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.