Menu
Popular Courses
Search

MCQs


Total Questions : 10
Question 1. What are core features of Express framework?
  1.    Allows to set up middlewares to respond to HTTP Requests
  2.    Defines a routing table which can works as per HTTP Method and URL
  3.    Dynamically render HTML Pages
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 2. How to store local variables that can be access within the application?
  1.    Using app.locals
  2.    Using app.storage
  3.    Using database
  4.    Config file
 Discuss Question
Answer: Option A. -> Using app.locals




Question 3. What will be the output of the below code in the console?File: my_module.jsexports.name = 'Zeus'; Code:var my_module = require('./mymodule');console.log((function(settings){    return settings.split('').reverse().join('')})(my_module.name));
  1.    Error
  2.    Zeus
  3.    undefined
  4.    sueZ
 Discuss Question
Answer: Option A. -> Error



Question 4. Where is captured values are populated regarding route parameters?
  1.    req.params object
  2.    app.locals object
  3.    req.data object
  4.    None of above
 Discuss Question
Answer: Option A. -> req.params object




Question 5. Route paths, in combination with a request method, define the endpoints at which requests can be made. Which of following are valid form of route path?
  1.    strings
  2.    string patterns
  3.    regular expressions
  4.    All of above
 Discuss Question
Answer: Option D. -> All of above




Question 6. What function arguments are available to Express.js Route handlers?
  1.    req - the request object
  2.    res - the response object
  3.    next
  4.    All of the above
 Discuss Question
Answer: Option D. -> All of the above




Question 7. How can we create chainable route handlers for a route path in ExpressJS app?
  1.    Using app.route()
  2.    Using app.router()
  3.    Using app.routing()
  4.    All of these
 Discuss Question
Answer: Option A. -> Using app.route()




Question 8. Imagine that you sent following ajax request:$.post("/process", {name:'john'}, function(data){    // Do some stuff}); What will be the answer from the server?Tip: On server side, we have the code which is given below Code:app.post('/process', function(req, res){    var data = '';     if(req.xhr){        data += 'One';    }     if(req.body.name){        data += 'Two';    }     res.send(data);});
  1.    OneTwo'
  2.    'One'
  3.    'Two'
  4.    All of these
 Discuss Question
Answer: Option A. -> OneTwo'




Question 9. What are the commands are used to enable debugging in Express App?
  1.    Linux
  2.    Windows
  3.    Both A and B
  4.    None
 Discuss Question
Answer: Option C. -> Both A and B




Question 10. In ExpressJS, the method app.all(path, callback [, callback ...]) can accept all HTTP methods
  1.    True
  2.    False
  3.    Insufficient data
  4.    None
 Discuss Question
Answer: Option A. -> True




Share this page with your friends!

Share this page with your friends!

Latest Videos

Chapter 1 - GLOBAL STEEL SCENARIO & INDI Part 1 : (13-04-2024) INDUSTRY AND COMPANY AWARENESS (ICA)
Direction Sense Test Part 1 Reasoning (Hindi)
Chapter 1 - RMHP / OHP / OB & BP Part 1 : (14-02-2024) GPOE
Cube & Cuboid Part 1 Reasoning (Hindi)
Data Interpretation (DI) Basic Concept Reasoning (Hindi)
Counting Figures Part 1 Counting Of Straight Lines Reasoning (Hindi)
Real Numbers Part 7 Class 10 Maths
Real Numbers Part 1 Class 10 Maths
Polynomials Part 1 Class 10 Maths

Latest Test Papers

Chapter 3.1 : Overview of Finance & Acco Chapter 3 : Finance & Accounts SAIL E0 - GFM 2024
Chapter 2.1 : Overview Chapter 2 : Materials Management SAIL E0 - GFM 2024
Chapter 1.1 : Personnel Functions- An ov Chapter 1 : Personnel Management SAIL E0 - GFM 2024
GPOE / GPA Combined 1 Free CBT Mock Test SAIL E0 2024
CBT Mixed Test 1 GPOE/GPA SAIL E0 2024