Mid-term Worksheet
Q1. Circle the correct answer for each of the following:
1-What is Node.js mainly used for? |
a-Building mobile apps | b-Writing frontend code | c--Server-side programming | d-Designing graphics |
2-Which of the following is a common use case for Node.js? |
a-Data analysis | b-Building web servers | c-Creating animations | d-Game development |
3- Which method is typically used to send data from an HTML form to Node.js? |
a-GET | b-POST | c-PUT | d-DELETE |
4- What method is used to display data after form submission in Node.js? |
a-res.render() | b- console.log() | c- res.send() | d-sendData() |
5-What programming language is Node.js built on? |
a-Python | b-JavaScript | c-Ruby | d-Java |
Q2. State, whether the given statements are “TRUE” or “FALSE”:
1 | Node.js cannot handle form submissions without using body-parser. |
|
2 | HTML form data is always sent using the GET method in Node.js. |
|
3 | Node.js is mainly used for building mobile applications. |
|
4 | Node.js can only be used with the Chrome browser. |
|
5 | The POST method in HTML forms sends data through the URL. |
|
Q3. Fill in the blank with the help of the given word bank:
Express | POST | HTML | JavaScript |
---|
Node.js | framework | block | module |
---|
In Node.js, a _______ is a reusable block of code that performs a specific task,
like reading files or handling HTTP requests.
Node.js is a _______ runtime, allowing developers to run JavaScript outside of a
browser.
An HTML form is a type of _______ that allows users to submit information.
In Node.js, data from an HTML form is commonly submitted using the _______
method.
To handle routing for HTML forms, we commonly use the _______ framework in
Node.js.
Q4. Match the Column A to Column B:
| Column A |
| Column B |
1 | HTML Form |
| A. Used to process incoming data from forms |
2 | POST Method |
| B. Framework for handling web requests in Node.js |
3 | body-parser |
| C. Runs JavaScript outside the browser |
4 | Express.js |
| D. Allows users to submit data through forms |
5 | Node.js |
| E. Used for sending data securely in HTML forms |
Subjective Section
Q5. Answer the following questions:
What is an HTML form in Node.js?
Q6. Label the missing elements:
Comments
Post a Comment