wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IP - LAP3,4&5_SY_25_for_3B

Total questions: 48

Worksheet time: 10mins

Name
Class
Date
1.

What is ReactJS primarily used for?

a)

Server-side programming

b)

Database management

c)

Building user interfaces

d)

Operating system development

2.

Who created ReactJS?

a)

Google

b)

Facebook

c)

Microsoft

d)

Amazon

3.

What is the key feature of React's DOM manipulation approach?

a)

It directly manipulates the browser's DOM

b)

It creates a virtual DOM in memory

c)

It bypasses DOM manipulation entirely

d)

It uses multiple DOMs simultaneously

4.

What is required to use React in production?

a)

Only a web browser

b)

Python and pip

c)

npm and Node.js

d)

Java Development Kit

5.

What command is used to create a new React application?

a)

npm start-react

b)

react create-new

c)

npx create-react-app

d)

node create-react

6.

What is the recommended action before creating a new React application if you've previously installed create-react-app globally?

a)

Update Node.js

b)

Uninstall create-react-app globally

c)

Clear browser cache

d)

Reset npm configurations

7.

After creating a new React application, which command is used to start it?

a)

react start

b)

start-app

c)

node start

d)

npm start

8.

Where is the main application file located in a React project?

a)

In the src folder as App.js

b)

In the root directory

c)

In the public folder

d)

In the components folder

9.

What type of applications is React commonly used to build?

a)

Mobile applications only

b)

Desktop applications only

c)

Single-page applications

d)

Operating systems

10.

What is DOM in the context of React?

a)

Digital Object Management

b)

Document Object Model

c)

Data Object Manipulation

d)

Directory Object Manager

11.

What is the primary difference between 'var' and 'const' declarations regarding scope in JavaScript?

a)

var has block scope while const has function scope

b)

Both have identical scope rules

c)

const has block scope while var has function scope

d)

Neither has block scope

12.

When using the map() method in React, what is its primary functionality?

a)

It only sorts arrays in ascending order

b)

It creates a copy of the original array without modifications

c)

It executes a function on each array element and returns a new array

d)

It only filters out unwanted elements

13.

In React JSX, why is the className attribute used instead of class?

a)

It's just a styling preference

b)

It provides additional functionality

c)

class is a reserved keyword in JavaScript

d)

It's required for CSS modules

14.

What is the significance of the createRoot() function in React?

a)

It creates a new component

b)

It defines where React components will be rendered in the DOM

c)

It initializes state management

d)

It handles routing

15.

When working with const and objects in React, which statement is true?

a)

The entire object becomes completely immutable

b)

The object reference can't be reassigned, but properties can be modified

c)

Properties can only be read, not modified

d)

The object must remain empty

16.

How must HTML code be structured in JSX?

a)

It can have multiple root elements

b)

It requires exactly two parent elements

c)

It must have one root element or fragment

d)

It can only use div elements

17.

What is the correct syntax for including JavaScript expressions in JSX?

a)

Using [[expression]]

b)

Using {expression}

c)

Using (expression)

d)

Using

18.

What happens to empty elements in JSX?

a)

They are automatically removed

b)

They must be self-closing with />

c)

They can be left open

d)

They require special attributes

19.

How should conditional rendering be handled in JSX?

a)

Using switch statements only

b)

Using while loops

c)

Using if statements outside JSX or ternary operators

d)

Using direct if statements inside JSX

20.

What is the purpose of React Fragments?

a)

To add styling to components

b)

To group elements without adding extra nodes to the DOM

c)

To create reusable components

d)

To handle state management

21.

How does array modification work with const in React?

a)

Arrays cannot be modified at all

b)

Only array length can be changed

c)

Array elements can be modified but not reassigned

d)

Arrays must be converted to let first

22.

What is JSX in React development?

a)

A database query language

b)

A testing framework

c)

A syntax extension allowing HTML in JavaScript

d)

A state management system

23.

When using map() for rendering lists, what is a best practice?

a)

Always sort the items first

b)

Limit the list to 10 items

c)

Provide a unique key prop for each item

d)

Use indexes as keys always

24.

How does the render method work in React?

a)

It only handles CSS rendering

b)

It defines which components to display in the DOM

c)

It's used for data fetching

d)

It only manages state updates

25.

What is the correct way to write multi-line HTML in JSX?

a)

Using semicolons between lines

b)

Wrapping it in parentheses

c)

Using line continuation characters

d)

Adding commas between elements

26.

How does variable scoping work with let in React?

a)

It has global scope only

b)

It has block scope

c)

It has function scope only

d)

It has no scope restrictions

27.

What is the relationship between JSX and JavaScript?

a)

They are completely separate languages

b)

JSX compiles to regular JavaScript

c)

JSX only works with TypeScript

d)

They cannot be used together

28.

How should large blocks of conditional content be handled in React?

a)

Always using switch statements

b)

Using multiple render methods

c)

Using logical operators or separate components

d)

Only using inline ternary operators

29.

What is the primary purpose of ES6 destructuring in React?

a)

To create new objects

b)

To combine multiple arrays

c)

To extract values from objects and arrays efficiently

d)

To modify object properties

30.

How does the root node concept work in React applications?

a)

Multiple root nodes are required

b)

The root node serves as the main container for React-managed content

c)

Root nodes cannot be customized

d)

Root nodes must be created dynamically

31.

______ are independent and reusable bits of code. They serve the same purpose as JavaScript functions but work in isolation and return HTML.

a)

React Functions

b)

React Components

c)

React Usable Codes

d)

React JSX

32.

______ are like arguments, and you send them into the component as attributes.

a)

React Functions

b)

React Components

c)

Properties

d)

State

33.

What time of component is this?

a)

Function Component

b)

Class Component

34.

What time of component is this?

a)

Function Component

b)

Class Component

35.

This type of function will be called when the component gets initiated.

a)

constructor()

b)

super()

c)

component()

d)

state()

36.

Give the result.

(Careful of spaces)

(a)  

37.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

38.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

39.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

40.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

41.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

42.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

43.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

44.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

45.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

46.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

47.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)  

48.

Give the result.

(Be careful of spaces and disregard the break if there is one. Use space instead. Put * if there is a bullet in your answer.)

(a)