0% found this document useful (0 votes)
32 views13 pages

Ethnus MERN Fullstack - Assessment - 2

The document is an assessment paper consisting of 30 questions related to the MERN Fullstack framework, covering topics such as React components, React Router DOM, Node.js, Express.js, and MongoDB. It includes questions on the differences between class and functional components, controlled vs. uncontrolled components, and various methods and concepts in Node.js. The assessment is designed for students to demonstrate their understanding of full-stack development concepts.

Uploaded by

AMAN KUMAR SINGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views13 pages

Ethnus MERN Fullstack - Assessment - 2

The document is an assessment paper consisting of 30 questions related to the MERN Fullstack framework, covering topics such as React components, React Router DOM, Node.js, Express.js, and MongoDB. It includes questions on the differences between class and functional components, controlled vs. uncontrolled components, and various methods and concepts in Node.js. The assessment is designed for students to demonstrate their understanding of full-stack development concepts.

Uploaded by

AMAN KUMAR SINGH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Ethnus MERN Fullstack - Assessment -2

This question paper consists of 30 questions.

priyanshusingh.2022@vitbhopal.ac.in Switch account Draft saved

* Indicates required question

Email *

Record priyanshusingh.2022@vitbhopal.ac.in as the email to be included with my


response

Name *

Priyanshu Singh

Mobile *

6307814602

VIT registration number *

22BCE10097
VIT email id *

priyanshusingh.2022@vitbhopal.ac.in

What are the differences between React's class components and functional *
components with hooks?

Class components allow for better performance compared to functional


components

Functional components with hooks offer simpler syntax and better code
organization

Class components cannot access lifecycle methods, while functional components


with hooks can

Functional components with hooks cannot hold state, while class components can

What are controlled components in React and how are they different from *
uncontrolled components?

Controlled components rely on internal state managed by React, while uncontrolled


components manage their own state

Controlled components cannot be updated by user input, while uncontrolled


components can

Controlled components directly manipulate the DOM, while uncontrolled


components do not

Controlled components use native HTML form elements, while uncontrolled


components use custom React components
Which of the following statements about React Router DOM is true? *

React Router DOM is not compatible with React applications

React Router DOM is primarily used for server-side routing

React Router DOM provides components for handling navigation and routing in
React applications

React Router DOM is only used for styling components in React applications

Which of the following React Router DOM components is used to render a *


component based on the URL path?

Route

Link

Switch

Redirect

What is the purpose of the BrowserRouter component in React Router DOM? *

It is used to define the root of the routing configuration for a React application

It is used to create a browser history object for navigation

It is used to define a static route in a React application

It is used to render a specific component based on the URL path


Which method is invoked immediately after a component is inserted into the *
DOM?

componentDidMount()

componentWillUnmount()

componentDidUpdate()

componentWillMount()

When does the componentDidUpdate() method get called in the React *


component lifecycle?

Before the component is unmounted from the DOM.

After the component has been rendered to the DOM and its state has changed.

Before the component is rendered to the DOM for the first time.

When the component's props are updated.

What is the purpose of the Virtual DOM in React? *

It is used to directly manipulate the HTML DOM elements.

It is used to efficiently update the browser's DOM when the state of a React
component changes.

It is used to store the entire state of a React component.

It is used to manage routing in a React application.


Can you pass functions as props in React? *

Yes, functions can be passed as props from parent to child components in React.

No, only primitive values such as strings and numbers can be passed as props.

Yes, functions can be passed as props from child to parent components in React.

No, functions cannot be passed as props in React.

What is JSX in React.js? *

A JavaScript extension for XML

A type of database

A server-side rendering technique

A programming language

Consider the following statements: *


1. The Virtual DOM is a lightweight, in-memory representation of the actual DOM
2. React creates a virtual representation of the UI components in memory and
then compares this representation
with the actual DOM, identifying the differences.
3. By using a Virtual DOM, React directly manipulates the real DOM, which can be
slow and inefficient.

Which of the above statements are incorrect

1 only

1 and 2 only

3 only

All of the above


Which of the following is NOT a way to handle events in React.js? *

Inline event handlers

Using event listeners

Binding events in the constructor

Using the event tag

What is the significance of keys in React.js? *

They uniquely identify elements in an array of components

They define CSS styles for components

They are used to encrypt sensitive data

They represent the version of React being used


Consider the following statements about state in ReactJs *
1. State is commonly used to manage data that changes over time, such as user
input, UI state, or data fetched from an
API.
2. State is local to the component in which it is defined. It cannot be accessed or
modified by other components unless
passed down as props.
3. changeState() is used to update the state
4. State is a fundamental concept in React components. Each component in
React can have its own state, which is
managed internally by the component.

Which of the above statements are true?

1 only

1,2 and 4 only

1,2 and 3

All of the above

Which of the following methods is used to include modules in Node.js? *

import

require

include

use
What is the purpose of the exports object in Node.js modules? *

To export the entire module

To export specific properties or methods

To import other modules

To store configuration settings

How can middleware be added to an Express.js application to execute on every *


request?

app.use((req, res, next) => { /* middleware code */ next(); });

app.all((req, res, next) => { /* middleware code */ next(); });

app.route((req, res, next) => { /* middleware code */ next(); });

app.middleware((req, res, next) => { /* middleware code */ next(); });

What does the await keyword do in an async function? *

Pauses execution until a promise is settled and returns its result

Executes code asynchronously

Throws an error if the promise is rejected

Returns a promise immediately


What is Node.js? *

A client-side JavaScript framework.

A server-side JavaScript runtime environment.

A database management system.

A CSS framework.

How do you create a simple server using the HTTP module in Node.js? *

http.createServer(requestHandler).listen(port);

http.server(requestHandler).port(port);

http.createServer(port).listen(requestHandler);

http.server().port(port).listen(requestHandler);

How do you update multiple documents in MongoDB? *

db.collection.update()

db.collection.updateMany()

db.collection.updateMultiple()

db.collection.updateAll()

Which method is used to read the content of a file in Node.js? *

fs.readFile()

fs.getFile()

fs.read()

fs.openFile()
What is the default scope of modules in Node.js? *

Global

Local to each file

Shared across all files

Static

How can you handle asynchronous operations in Node.js? *

Using setTimeout

Using callbacks, Promises, or async/await

Using synchronous functions only

Using event listeners exclusively

Which phase of the Node.js event loop executes timers scheduled by setTimeout *
and setInterval?

I/O callbacks

Poll

Timers

Close callbacks
What is the purpose of the event loop in Node.js? *

To manage file I/O operations.

To handle asynchronous callbacks.

To process HTTP requests.

To initialize global variables.

What is Express.js? *

A front-end framework

A back-end framework

A database management system

A JavaScript compiler

Which of the following methods is used to define a route for handling GET *
requests in
Express.js?

app.post()

app.get()

app.put()

app.fetch()
What is the default port for MongoDB? *

27017

8080

3306

5432

Which of the following is used to create an index on a field in MongoDB?

db.collection.ensureIndex()

db.collection.createIndex()

db.collection.addIndex()

db.collection.buildIndex()

Clear selection

Submit Clear form

Never submit passwords through Google Forms.

This form was created inside of ETHNUS CONSULTANCY SERVICES PVT. LTD..
Does this form look suspicious? Report

Forms

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy