1.

Which of the following query is used to generate a new ObjectId, use the ObjectId() constructor with no argument?(a) x = ObjectIdAdd()(b) x = addObjectId()(c) x = ObjectId()(d) none of the mentionedThis question was addressed to me by my school principal while I was bunking the class.My doubt stems from ObjectId topic in chapter GridFS, BSON Datatype and Administration Concepts of MongoDB

Answer» RIGHT option is (c) X = ObjectId()

The best I can EXPLAIN: ObjectId() constructor is USED with no argument for new OBJECT.


Discussion

No Comment Found

Related InterviewSolutions