14 points

Append a Value to an Array


Posted by [deleted user] #javascript #nodejs

   { _id: 1 },
   { $push: { scores: 89 } }
content_copy Copy

The processing of the push operation with modifiers occur in the following order, regardless of the order in which the modifiers appear: Update array to add elements in the correct position. Apply sort, if specified. Slice the array, if specified. Store the array.