adplus-dvertising
frame-decoration

Question

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 mentioned

Posted under MongoDb Datatypes MongoDB

Answer: (c).x = ObjectId()

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which of the following query is used to generate a new ObjectId, use the ObjectId() constructor with no argument?