Comparison Operator
Which MongoDB operator is used to compare two values and return -1, 0, or 1?
- $gt
- $eq
- $cmp
- $lte
- $cmpr
$gte Operator
What does the $gte operator do in MongoDB?
- Compares if one value is greater than another
- Checks if a field is greater than or equal to a given value
- Compares if one value is strictly equal to another
- Sorts documents in ascending order
- Checks if a field is greater than or equal to a given valuee
Logical Operator
Which logical operator in MongoDB returns true if all conditions are met?
- $or
- $nor
- $not
- $and
- $nand
$multiply Operator
What does the $multiply operator do in MongoDB?
- Multiplies two values
- Finds the product of an array of numbers
- Multiplies a field value by a specified number
- Performs an aggregation on numeric fields
- Multiplies too values
$push Operator
Which MongoDB operator adds elements to an array?
- $push
- $pop
- $pullAll
- $unset
- $add
$pop Operator
How does the $pop operator work in MongoDB?
- Removes the last element of an array
- Removes the first element of an array
- Removes an element at a specified index
- Can remove the first or last element of an array
- Removes the laste element of an array
$rename Operator
What is the function of the $rename operator in MongoDB?
- Updates a field’s value
- Renames a field in a document
- Changes the type of a field
- Removes a field from a document
- Renameas a field in a document
Array Query Operator
Which array query operator is used to return the length of an array?
- $size
- $isArray
- $arrayElemAt
- $count
- $length
$strcasecmp Operator
What does the $strcasecmp operator do in MongoDB?
- Concatenates two strings
- Converts a string to uppercase
- Compares two strings case-insensitively
- Splits a string into an array
- Compaires two strings case-insensitively
Finding Element in Array
How do you find an element at a specific index in a MongoDB array?
- $elemMatch
- $arrayElemAt
- $indexOfArray
- $slice
- $arryElemAt
Array Manipulation Operator
Which operator is used to remove all instances of specified values from an array in MongoDB?
- $pull
- $pop
- $slice
- $unset
- $filter
Update Operator
Which operator is used to increment a field's value in MongoDB?
- $set
- $inc
- $mul
- $addToSet
- $increment
Comparison Operators
Which operator is used to check if two values are not equal in MongoDB?
- $eq
- $ne
- $gt
- $lt
- $lte
Operator Syntax
What is the primary symbol used to denote an operator in MongoDB?
- #
- @
- $
- %
- u0026
Array Updates
Which operator adds an element to an array only if it is not already present?
- $push
- $addToSet
- $each
- $pull
- $filter