Font size
WorksheetsSec-E Quiz 26-4-2023
Total questions: 82
Worksheet time: 41mins
________ is a back end web application framework for Node.js, it is fast, unopinionated and minimalist framework.
Emotional.js
Express.js
Nodemon
Doraemon
Creator of Node.js
Ryan Dahl
Ryan Bang
Ryan Agoncillo
Ryan Reynolds
Which is the correct syntax for Arrow Function?
->
<--!
=>
function arrow()
________ are the blocks of encapsulated code that communicates with an external application on the basis of their related functionality.
Application
Code
Dependencies
Modules
What module provides utilities for working with file and directory paths?
OS Module
Path Module
FS Module
HTTP Module
What module provides information about the computer's operating system?
OS Module
Path Module
FS Module
HTTP Module
What is the right syntax for importing a module?
require()
function()
import()
module.import()
Middleware functions are functions
•Execute any code.
•Make changes to the request and the response objects.
•End the request-response cycle.
All mentioned
var express = require('express')
var app = express()
var myLogger = function (req, res, next) {
console.log('LOGGED')
next()
}
app.use(myLogger)
app.get('/', function (req, res) {
res.send('Hello World!')
})
app.listen(3000)
What will be outpiut on localhost:2000?
Hello World!
None of mentioned
There is error in code
app.use is used for
The middleware function is executed when the base of the requested path matches path.
Routes HTTP GET requests to the specified path with the specified callback functions.
Both mentioned
None mentioned
A template engine...
replaces variables in a template file with actual values, and transforms the template into an JSON file sent to the server
replaces variables in a template file with actual values, and transforms the template into an HTML file sent to the client
replaces variables in a template file with actual values, and transforms the template into an HTML file sent to the server
replaces variables in a template file with actual values, and transforms the template into an JSON file sent to the client
PM2 is...
A simple command-line interface tool to ensure that a script runs continuously
A project manager above of a normal project managers (PM) and with a better salary
A fast and lightweight HTML-based templating engine that compiles templates to CommonJS modules and supports streaming, async rendering and custom tags. (render directly to the HTTP response stream)
A production process manager for Node.js applications that has a built-in load balancer
HTTPS is
Hypertext transfer protocol secure (HTTPS) is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website
Hypertext transfer primary secure (HTTPS) is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website
I'm not sure, but I liked the slide with Britney Spears
Can I drop off the meeting now?
Why secure HTTP headers?
To add the X-Powered-By attribute informing the browser which server vendor and version you’re using
Hackers typically cross-reference this information with a list of publicly disclosed known vulnerabilities
To make the responses more faster and lightweight
For debugging and for logging app activity while running the application in production environments
What command is used to manage different NodeJS veresions?
npm
node
nvm
js
Which of the following routes is considered a RESTful configuration for ExpressJS?
/{id}
/:id
/?id=val
/id=val
Asynchronous functions can trigger the callback of the catch part using what keyword?
return
throw
await
await
What global variable is used to access the environment variables of a NodeJS application?
env
ENV
process.env
Process.getEnv()
Collection is a group of MongoDB ___________?
Document
Database
Table
Row
What is Mongoose?
An object document mapping
An object-relational mapping
A small terrestrial carnivorous
HTTPS is
Hypertext transfer protocol secure (HTTPS) is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website
Hypertext transfer primary secure (HTTPS) is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website
Can I drop off the meeting now?
filters the document stream to allow only matching documents to pass unmodified into the next pipeline stage
$regex
$reg
$match
none of the mentioned
the ................. method limits the number of documents in the result set?
limit()
limitOf()
limitBy()
none of the montioned
which of the following line skips the first 5 documents in the bios collection and returns all remaining documents?
db.bios.find.limit(5)
db.bios.find.skip(1)
db.bios.find.skip(5)
db.bios.find.sort(5)
point out the correct statement?
collection is a group of MongoDB documents
collections do not enforce a schema
all the mentoned
BSON is a binary representation of .............. documents?
JSON
XML
JScript
all the mentioned
ReactJs cover
User Interface layer in an application
Data layer in an application
Both A and B
None of the above
React component can return how many html tags
one
multiple
two
three
const [x, y] = useState(0) -> what is the y
Setter function
Getter function (state variable)
what is the output
[[1, 2, 3, 4, 5]]
[1, 2, 3, 4, 5]
1
[1]
How is a Middleware built?
app.use(<PATH>, (req, res) => {
// validations
});
app.use(<PATH>, (req, res, next) => {
// validations
next()
});
app.middleware(<PATH>, (req, res, next) => {
// validations
next()
});
app.middleware(<PATH>, (req, res) => {
// validations
});
Part of a program that does not work correctly.
Loop
Bug
Debug
Program
A bug can really mess up the program, so it's important to learn to_______your code.
Reset
Start over
Debug
Remove
The action of doing something over and over again.
Run
Step
Loop
Event
A list of steps to finish a task.
Sequence
Algorithm
Start Over
Play Area
An algorithm that has been coded into something that can be run by a machine.
Loop
Debug
Program
Bug
Do something again
Run
Repeat
Start Over
Step
The area where you run your code.
Workspace
Play Area
Instructions
Start over
A repeat block within a repeat block
Loopy Loop
Condition Loop
Nested Loop
Event
The art of creating a program
Debugging
Blockly
Programming
Program
The very first step in debugging is to
raise your hand to ask the teacher
keep going like nothing is wrong
find the error in the program
give up
What is the buffer in Node.js?
Memory allocated outside V8 to store raw binary data
In-memory location inside V8 used for streaming
Client side storage used to store local data
What is the buffer in Node.js?
Memory allocated outside V8 to store raw binary data
In-memory location inside V8 used for streaming
Client side storage used to store local data
What are streams in Node.js
process of flow of data from source to buffer
a raw memory storage for streaming data
transport channels for tcp/ip sockets
What is not built-in node module?
util
os
zlib
express
Streams are similar to event emitters?
true
false
How many types of streams are there?
3, readable, writeable and both
2, readable, writeable
1 read only
