-
Write a MongoDB query to display all the documents in the collection restaurants.
-
Write a MongoDB query to display the fields restaurant_id, name, borough and cuisine for all the documents in the collection restaurant.
-
Write a MongoDB query to display the fields restaurant_id, name, borough and cuisine, but exclude the field _id for all the documents in the collection restaurant.
-
Write a MongoDB query to display the fields restaurant_id, name, borough and zip code, but exclude the field _id for all the documents in the collection restaurant.
-
Write a MongoDB query to display all the restaurant which is in the borough Bronx.
-
Write a MongoDB query to display the first 5 restaurant which is in the borough Bronx.
-
Write a MongoDB query to find the restaurants who achieved a score more than 90.
-
Write a MongoDB query to find the restaurants that do not prepare any cuisine of 'American' and their grade score more than 70 and latitude less than -65.754168.
-
Write a MongoDB query to find the restaurants which do not prepare any cuisine of 'American' and achieved a score more than 70 and located in the longitude less than -65.754168. Note : Do this query without using $and operator.
-
Write a MongoDB query to find the restaurants which do not prepare any cuisine of 'American ' and achieved a grade point 'A' not belongs to the borough Brooklyn. The document must be displayed according to the cuisine in descending order.
-
Write a MongoDB query to find the restaurants which belong to the borough Bronx and prepared either American or Chinese dish.
-
Write a MongoDB query to find the restaurant Id, name, borough and cuisine for those restaurants which belong to the borough Staten Island or Queens or Bronxor Brooklyn.
Q 1 - What is Callback?
A - Callback is an asynchronous equivalent for a function. B - Callback is a technique in which a method call back the caller method. C - Both of the above. D - None of the above.
Q 2 - Which of the following is true about EventEmitter.emit property?
A - emit property is used to locate an event handler. B - emit property is used to bind a function with the event. C - emit property is used to fire an event. D - None of the above.
Q 4 - Which of the following is true about File I/O in Node applications?
A - Node implements File I/O using simple wrappers around standard POSIX functions. B - Node File System (fs) module should be imported for File I/O opearations. C - Both of the above. D - None of the above.
Q 4 - Which of the following is true about clearTimeout(t) global function?
A - The clearTimeout( t ) global function is used to stop a timer that was previously created with setTimeout(). B - The clearTimeout( t ) function returns an opaque value that represents the timer which can be used to clear the timer. C - Both of the above. D - None of the above.
Q 5 - Which of the following is the correct way to get an extension of a file?
A - fs.extname('main.js') B - path.extname('main.js') C - os.extname('main.js') D - None of the above.
Q 6 - net.isIP(input) returns 0 for invalid input.
A - true B - false
Q 7 - Which of the following module is required to create a child process?
A - process module B - child_process module C - child module D - web module
Q 8 - A stream fires end event when there is no more data to read.
A - true B - false
- Create 2 Answer files, one more Mongodb and other for NodeJS
- Send me your Github URL of your project in private direct message in slack