Free MEAN Stack Development Questions and Answers — Questions and Answers
Question 1: FREE MEAN Stack Development Questions and Answers
- locally installed module (Correct answer)
- packaged modules
- Web applications
- nodejs sample modules
Correct answer: locally installed module
A Node.js project's locally installed modules are listed using the $ npm ls command. The installed modules and their dependencies are shown in detail.
Question 2: What unique special key does MongoDB assign to each document in a collection?
- _sno
- _key
- _id (Correct answer)
- _no
Correct answer: _id
The _id field in MongoDB is a unique key that is added automatically to each document in a collection. It acts as the document's main key and gives it a special identification inside the collection.
Question 3: Choose the JavaScript object that is server-side.
- File (Correct answer)
- FileUpLoad
- Date
- Function
Correct answer: File
The File object is server-side, used in environments like Node.js to interact with the local file system. FileUpload is a client-side (browser DOM) object, while Date and Function are core JavaScript objects that exist in any environment rather than being server-specific.
Question 4: What is returned by the subsequent expression? round(-20.51) =
- 19
- 20
- -21 (Correct answer)
- none of the above
Correct answer: -21
The expression Math.round(-20.51) returns the value -21. <br> The Math.round() function in JavaScript is used to round a number to the nearest whole number. When applied to -20.51, it rounds the number to the nearest integer value. Since -20.51 is closer to -21 than to -20, the result is -21.
Question 5: Which of the following Angular functions calls the iterator function?
- angular.lowercase
- angular.forEach (Correct answer)
- angular.extend
- angular.uppercase
Correct answer: angular.forEach
In AngularJS (not to be confused with Angular), the angular.forEach function is used to iterate over elements in an array or object. It invokes the specified iterator function for each item in the collection.
Question 6: A Node.js web server is built using the _____________ core module.
- connect
- fs
- url
- http (Correct answer)
Correct answer: http
The http module in Node.js provides the necessary functionality to create an HTTP server or make HTTP requests as a client. It includes classes and methods to handle incoming HTTP requests, manage server connections, and construct HTTP responses.
Question 7: Which MongoDB type is it?
- Hierarchical
- Document-oriented (Correct answer)
- Relational
- None of the above
Correct answer: Document-oriented
MongoDB is a NoSQL database management system (DBMS). It is classified as a document-oriented database, which falls under the wider category of NoSQL databases.
FREE MEAN Stack Development Questions and Answers