Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

web 3 nodeJS

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.
What is Node.js primarily used for?
a)
Running JavaScript on the server side
b)
Creating desktop GUIs
c)
Styling web pages
d)
Building mobile applications
2.
Which engine powers Node.js?
a)
V8
b)
SpiderMonkey
c)
Chakra
d)
JavaScriptCore
3.
What is the file extension of a Node.js file?
a)
.js
b)
.txt
c)
.node
d)
.json
4.
How do you import the built-in 'http' module in Node.js?
a)
import http from 'http'
b)
include('http')
c)
require('http')
d)
use('http')
5.
What is 'npm'?
a)
Node Package Manager
b)
Node Programming Manager
c)
Node Prebuilt Modules
d)
Network Package Manager
6.
Which of these is a popular web framework for Node.js?
a)
Express
b)
Spring
c)
Flask
d)
Laravel
7.
What is the purpose of 'package.json'?
a)
To list all the JavaScript files
b)
To store the Node.js binary
c)
To configure environment variables
d)
To define metadata and dependencies of the project
8.
How do you install a package globally using npm?
a)
npm load [package-name]
b)
npm get [package-name]
c)
npm install -g [package-name]
d)
npm global add [package-name]
9.
What is the purpose of the 'require' function in Node.js?
a)
To declare variables
b)
To import external modules
c)
To run test cases
d)
To open database connections
10.
What is the 'node_modules' directory used for?
a)
To store compiled files
b)
To hold all installed Node.js packages
c)
To store system logs
d)
To run background services
11.
Which command initializes a new Node.js project and creates a package.json file?
a)
npm create
b)
node init
c)
npm new
d)
npm init
12.
Where are the dependencies listed in a Node.js project?
a)
npm.config
b)
app.js file
c)
package.json under 'dependencies'
d)
node_modules folder
13.
Which tool is commonly used to automatically restart a Node.js app on file changes?
a)
Nodemon
b)
Webpack
c)
Eslint
d)
Babel
14.
Which middleware function is commonly used to parse JSON in Express?
a)
parse.json()
b)
app.useJson()
c)
body.json()
d)
express.json()
15.
Which Express method is used to handle POST requests?
a)
app.get()
b)
app.send()
c)
app.receive()
d)
app.post()