Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

MongoDB C100DBA Exam - Topic 1 Question 24 Discussion

Posted by Weldon on May 04, 2022 at 12:51 AM

What does the following $slice query return using the following command? db.posts.find( {}, { comments: { $slice: [ -10, 5 ] } } )

Suggested Answer: A

Get Premium C100DBA Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
11 comments · newest first
LA
Laurel 11 months ago
I thought it would return the last 10 comments, not just 5.
KR
Krissy 12 months ago
Nope, it's definitely not option C.
AL
Alise 12 months ago
Wait, how does that even work? Sounds weird.
ST
Stevie 12 months ago
Totally agree, it's option A!
OL
Olive 1 year ago
It returns 5 comments starting from the last 10.
GA
Gail 1 year ago
I’m confused about whether it starts counting from the last 10 comments or if it just returns the last 5 comments.
OL
Oliva 1 year ago
I remember practicing a similar question where negative values indicated starting from the end of the array, so maybe it’s option A?
TR
Trinidad 1 year ago
I think the $slice operator is supposed to return a subset of an array, but I'm not entirely sure how the negative index works in this context.
HY
Hyun 1 year ago
I feel like I saw something about how $slice can take two parameters, but I can't recall exactly how they interact.
MA
Malcolm 1 year ago
Okay, I've got this. The Business Case is the DSDM product that is used for prioritization within a project portfolio, so that's my answer.
SH
Sharen 1 year ago
Okay, I'm feeling pretty confident about this one. I think Option C is the way to go - creating a Triggered Send and then enabling the custom Reply Mail Management settings to send the auto-reply. That should do the trick.
0/2000 characters

Save Cancel