MEAN Trivia 2 — Questions and Answers
Question 1: Which year was MongoDB first released publicly?
- 2007
- 2009 (Correct answer)
- 2011
- 2013
Correct answer: 2009
MongoDB was first released publicly in 2009 by 10gen (now MongoDB, Inc.).
Question 2: What does the 'E' stand for in the MEAN stack?
- Ember.js
- Express.js (Correct answer)
- Electron
- Elastic
Correct answer: Express.js
The 'E' in MEAN stands for Express.js, a minimal Node.js web application framework.
Question 3: Which HTTP method is conventionally used to fully replace a resource in a RESTful Express API?
- POST
- PATCH
- PUT (Correct answer)
- DELETE
Correct answer: PUT
PUT is used to completely replace a resource, while PATCH is used for partial updates.
Question 4: In Angular, what decorator is used to define a component?
- @NgModule
- @Injectable
- @Component (Correct answer)
- @Directive
Correct answer: @Component
@Component decorator marks a class as an Angular component and provides configuration metadata.
Question 5: What is the default port that MongoDB listens on?
- 3306
- 5432
- 27017 (Correct answer)
- 6379
Correct answer: 27017
MongoDB's default port is 27017 unless configured otherwise.
Question 6: Which Node.js global object provides information about the current process?
- global
- process (Correct answer)
- runtime
- system
Correct answer: process
The `process` global object provides information and control over the current Node.js process.
Question 7: What Angular feature allows you to automatically update the UI when model data changes?
- Two-way data binding (Correct answer)
- One-way data flow
- State management
- Event delegation
Correct answer: Two-way data binding
Two-way data binding with [(ngModel)] keeps the view and model in sync automatically.
Which year was MongoDB first released publicly?