MCQs | Express.js/Express.js Mcq Question Set 2 Sample Test,Sample questions

Question:
How many node types are there in total?

1. 11

2.12

3.13

4. 14


Question:
The blobs are broken into smaller pieces using which of the following functions?

1.partition()

2.cut()

3.sliceall()

4.slice()


Question:
What does a Node object represent?

1. Single node

2.Set of nodes

3. Sequence of nodes

4.Node array


Question:
What is the purpose of the method getUserData(key)?

1.Returns the associated object

2.Gets the user data

3.Returns the user data

4.Gets the user key


Question:
Which object can be used to create your own blobs?

1.Creator

2.BlobCreator

3.BlobBuilder

4.BuilderBlob


Question:
Which of the following Node object property returns the local part of the name of a node?

1.lastName

2.localName

3. firstName

4.objectname


Question:
A Blob URL can be created using which of the following function?

1.createURL()

2.createObjectURL()

3.designURL()

4.URLCreation()


Question:
BLOB stands for ______

1.Binary Little Object

2.Binary Large Object

3. Broken Large Object

4.Binary Small object


Question:
Define templating in ExpressJs ?

1.Pug

2.EJS

3.Mustache

4.All of the above


Question:
How are the objects organized in the HTML DOM?

1.Class-wise

2.Queue

3.Hierarchy

4. Stack


Question:
How can the nodes in the node list be accessed?

1.Key

2. Index number

3.Looping

4. Value


Question:
How is everything treated in HTML DOM?

1.Node

2.Attributes

3.Elements

4.Arrays


Question:
How many node object properties are there?

1.12

2.14

3.16

4.17


Question:
How many nodetype – named constants are available?

1.13

2.11

3.12

4.10


Question:
How to associate an object to a key on a node?

1. getUserData()

2. cloneNode()

3. setUserData(key,data,handler)

4.clonedata()


Question:
How to test if two nodes are equal?

1.isEqualNode()

2. equal()

3.==

4. equalto()


Question:
How to use express js in node?

1.var = require('express')();

2.var_require('express')();

3.var app = require('express')();

4.None of them


Question:
One of the main advantage of using src attribute is _______

1. It becomes self-cached

2. It makes the HTML file modular

3.It restricts manipulation in the HTML file

4.It simplifies the HTML files


Question:
The blobs are generally stored in ______

1.Memory

2. Disk

3. Both Memory and Disk

4.Temporary storage


Question:
The language is commonly used to _______

1.Specify the user’s language

2. Specify the language going to be scripted

3.No longer in use

4.Specify the programmer’s favourable language


Question:
The size of blobs are generally calculated in ______

1.Meters

2.Kilometers

3.Bytes

4. Pixels


Question:
What does the NamedNodeMap object represent in the HTML DOM?

1.Unordered collection of elements

2. Unordered collection of attributes

3.Unordered collection of nodes

4.Unordered collection of arrays


Question:
What does the nodeName of the nodeType Document return?

1.doctype name

2.target

3. #comment

4.#document


Question:
What is middleware in ExpressJs ?

1. function(req){ }

2.method(req){ }

3.function(req,res,next){ }

4.method(req,res,next){ }


Question:
What is Scaffolding in Express.js?

1.Yeoman

2.Express application generator

3.Handler functions

4.Both A & B


Question:
What is the code for getting the current time?

1. now = new Date();

2.var now = new Date();

3.var now = Date();

4.var now = new Date(current);


Question:
What is the code to start displaying the time when the document loads?

1. onload = displayTime;

2.window. = displayTime;

3.window.onload = displayTime;

4.window.onload = start;


Question:
What is the default value of the type attribute?

1. text/css

2.text/javascript

3. html

4. xml


Question:
What is the purpose of the DocumentFragment node type?

1. To hold a portion of a document

2. To split the document into fragments

3.To hold the entire document

4.To hold the fragments


Question:
What is the purpose of the Legacy DOM?

1.Makes the scripting easier

2.Allows access to few keys and elements

3.Modify the nodes

4.Making the script modular


Question:
What is the purpose of the method item()?

1.Returns node after the specified index

2. Returns node before the specified index

3.Returns node at specified index

4.Returns the node following the specified node


Question:
What is the purpose of the method nodeMap.setNamedItem()?

1.Sets ID

2.Sets attribute node

3.Sets element name

4.Sets element type


Question:
What is the purpose of the Node object property ownerDocument?

1.Returns the root element

2.Returns the last element

3.Returns the parent node

4.Returns the immediate node


Question:
What is the reason for avoiding the attributes property in the HTML DOM?

1.Found unnecessary

2.Attributes don’t have attributes

3. Attributes have attributes

4.Considered irrelevant


Question:
What will be done if more than one page requires a file of JavaScript code?

1.Downloads that many times

2.Retrives from the browser cache

3. Must be re executed

4.Must be included in all the pages


Question:
When does JavaScript code appear inline within an HTML file?

1.Between the “script” tag

2.Outside the “script” tag

3.Between or Outside the “script” tag

4.Between the header tag


Question:
Which algorithm supports blobs?

1.Structured clone algorithm

2. Double buffer algorithm

3. Chen’s algorithm

4.Retrieval algorithm


Question:
Which character in JavaScript code will be interpreted as XML markup?

1. !

2.>

3.&

4. .


Question:
Which database can be used to retrieve blobs?

1.Server-side databases

2.Client-side databases

3.Both Server-side and Client-side databases

4.Temporary databases


Question:
Which is the root element in a HTML document?

1.HTML

2.HEAD

3.HEAD

4.BODY


Question:
Which method facilitates in uploading a Blob to a server?

1.send()

2.pass()

3. upload()

4.store()


Question:
Which method is used to compare the placement of two nodes in the DOM hierarchy (document)?

1.compareDocumentPosition()

2.cloneNode()

3. getUserData()

4.getFeature()


Question:
Which node type represents the root-node of the DOM tree?

1.Document

2.DocumentFragment

3.DocumentType

4.Entity


Question:
Which object is the top of the hierarchy?

1.Window Object

2.Document Object

3. Form Object

4.Form Control Elements


Question:
Which of the following is a subtype of Blob?

1.Elemental Object

2.Create Object

3. Data Object

4.File Object


Question:
Which of the following is a type of HTML DOM?

1.Legacy DOM

2.W3C DOM

3.IE4 DOM

4.All of the Mentioned


Question:
Which of the following is a way of embedding Client-side JavaScript code within HTML documents?

1. From javascript:encoding

2.External file specified by the src attribute of a “script” tag

3.By using a header tag

4.By using body tag


Question:
Which of the following is the child(s) of the node type EntityReference?

1. Element

2. Text

3. Both Element and Text

4. Entity


Question:
Which of the following Node object property returns the node immediately before a node?

1.previousSibling

2.textContent

3. index

4.localName


Question:
Which of the following Node types have a node value equal to null?

1.Document

2.DocumentFragment

3.DocumentType

4.All of the Mentioned


More MCQS

  1. Express.js Mcq Question Set 1
  2. Express.js Mcq Question Set 2
Search