MCQ Node
MCQ Node
Answer: A
Answer: C
Answer: D
How do you install MongoDB driver for Node.js? A. npm install mongodb B. npm
install mongodb-driver C. npm install mongo-client D. npm install mongo-driver
Answer: A
Answer: A
Which command is used to connect to the MongoDB server from the command
line? A. mongod B. mongo C. mongos D. mongodump
Answer: B
What is the default port number for the MongoDB server? A. 27017 B. 27018 C.
27019 D. 27020
Answer: A
Answer: C
Answer: D
Answer: A
How do you retrieve all documents from a collection in MongoDB using Node.js?
A. collection.getAll() B. collection.find() C. collection.fetchAll() D.
collection.retrieveAll()
Answer: B
Answer: B
Answer: A
Answer: A
How do you delete a document from a collection in MongoDB using Node.js? A.
collection.deleteOne() B. collection.remove() C. collection.erase() D.
collection.destroy()
Answer: A
Answer: A