Olete.in
Articles
Mock Tests
đź§Ş Express.js MCQ Quiz Hub
Express.js Mcq Question Set 2
Choose a topic to test your knowledge and improve your Express.js skills
1. What is Scaffolding in Express.js?
Yeoman
Express application generator
Handler functions
Both A & B
2. What is middleware in ExpressJs ?
function(req){ }
method(req){ }
function(req,res,next){ }
method(req,res,next){ }
3. Define templating in ExpressJs ?
Pug
EJS
Mustache
All of the above
4. How to use express js in node?
var = require('express')();
var_require('express')();
var app = require('express')();
None of them
5. How many node types are there in total?
11
12
13
14
6. What is the purpose of the Node object property ownerDocument?
Returns the root element
Returns the last element
Returns the parent node
Returns the immediate node
7. Which of the following Node object property returns the local part of the name of a node?
lastName
localName
firstName
objectname
8. Which of the following Node object property returns the node immediately before a node?
previousSibling
textContent
index
localName
9. What is the purpose of the method getUserData(key)?
Returns the associated object
Gets the user data
Returns the user data
Gets the user key
10. How to test if two nodes are equal?
isEqualNode()
equal()
==
equalto()
11. How to associate an object to a key on a node?
getUserData()
cloneNode()
setUserData(key,data,handler)
clonedata()
12. Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?
compareDocumentPosition()
cloneNode()
getUserData()
getFeature()
13. What does a Node object represent?
Single node
Set of nodes
Sequence of nodes
Node array
14. What does the nodeName of the nodeType Document return?
doctype name
target
#comment
#document
15. What is the purpose of the method item()?
Returns node after the specified index
Returns node before the specified index
Returns node at specified index
Returns the node following the specified node
16. How can the nodes in the node list be accessed?
Key
Index number
Looping
Value
17. Which of the following is the child(s) of the node type EntityReference?
Element
Text
Both Element and Text
Entity
18. Which node type represents the root-node of the DOM tree?
Document
DocumentFragment
DocumentType
Entity
19. What is the purpose of the DocumentFragment node type?
To hold a portion of a document
To split the document into fragments
To hold the entire document
To hold the fragments
20. How many nodetype – named constants are available?
13
11
12
10
21. Which of the following Node types have a node value equal to null?
Document
DocumentFragment
DocumentType
All of the Mentioned
22. How many node object properties are there?
12
14
16
17
23. What is the reason for avoiding the attributes property in the HTML DOM?
Found unnecessary
Attributes don’t have attributes
Attributes have attributes
Considered irrelevant
24. What is the purpose of the method nodeMap.setNamedItem()?
Sets ID
Sets attribute node
Sets element name
Sets element type
25. How is everything treated in HTML DOM?
Node
Attributes
Elements
Arrays
26. What does the NamedNodeMap object represent in the HTML DOM?
Unordered collection of elements
Unordered collection of attributes
Unordered collection of nodes
Unordered collection of arrays
27. How are the objects organized in the HTML DOM?
Class-wise
Queue
Hierarchy
Stack
28. Which of the following is a type of HTML DOM?
Legacy DOM
W3C DOM
IE4 DOM
All of the Mentioned
29. What is the purpose of the Legacy DOM?
Makes the scripting easier
Allows access to few keys and elements
Modify the nodes
Making the script modular
30. Which object is the top of the hierarchy?
Window Object
Document Object
Form Object
Form Control Elements
31. Which of the following is a way of embedding Client-side JavaScript code within HTML documents?
From javascript:encoding
External file specified by the src attribute of a “script” tag
By using a header tag
By using body tag
32. When does JavaScript code appear inline within an HTML file?
Between the “script” tag
Outside the “script” tag
Between or Outside the “script” tag
Between the header tag
33. Which character in JavaScript code will be interpreted as XML markup?
!
>
&
.
34. Which is the root element in a HTML document?
HTML
HEAD
HEAD
BODY
35. What is the code for getting the current time?
now = new Date();
var now = new Date();
var now = Date();
var now = new Date(current);
36. What is the code to start displaying the time when the document loads?
onload = displayTime;
window. = displayTime;
window.onload = displayTime;
window.onload = start;
37. One of the main advantage of using src attribute is _______
It becomes self-cached
It makes the HTML file modular
It restricts manipulation in the HTML file
It simplifies the HTML files
38. What will be done if more than one page requires a file of JavaScript code?
Downloads that many times
Retrives from the browser cache
Must be re executed
Must be included in all the pages
39. What is the default value of the type attribute?
text/css
text/javascript
html
xml
40. The language is commonly used to _______
Specify the user’s language
Specify the language going to be scripted
No longer in use
Specify the programmer’s favourable language
41. BLOB stands for ______
Binary Little Object
Binary Large Object
Broken Large Object
Binary Small object
42. The size of blobs are generally calculated in ______
Meters
Kilometers
Bytes
Pixels
43. The blobs are generally stored in ______
Memory
Disk
Both Memory and Disk
Temporary storage
44. The blobs are broken into smaller pieces using which of the following functions?
partition()
cut()
sliceall()
slice()
45. Which algorithm supports blobs?
Structured clone algorithm
Double buffer algorithm
Chen’s algorithm
Retrieval algorithm
46. Which database can be used to retrieve blobs?
Server-side databases
Client-side databases
Both Server-side and Client-side databases
Temporary databases
47. Which object can be used to create your own blobs?
Creator
BlobCreator
BlobBuilder
BuilderBlob
48. Which of the following is a subtype of Blob?
Elemental Object
Create Object
Data Object
File Object
49. Which method facilitates in uploading a Blob to a server?
send()
pass()
upload()
store()
50. A Blob URL can be created using which of the following function?
createURL()
createObjectURL()
designURL()
URLCreation()
Submit