1.

__________ returns the JavaScript representation in the form of a string literal.(a) toStringJava()(b) toString()(c) String()(d) none of the mentionedI have been asked this question in an interview.This intriguing question comes from ObjectId in section GridFS, BSON Datatype and Administration Concepts of MongoDB

Answer»

Right option is (b) TOSTRING()

To EXPLAIN I would say: In previous VERSIONS, toString() returns the HEXADECIMAL string REPRESENTATION, which as of version 2.2 can be retrieved by the str property.



Discussion

No Comment Found

Related InterviewSolutions