wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

JavaScript and React Quiz

Total questions: 18

Worksheet time: 9mins

Name
Class
Date
1.

What does REST stand for?

a)

Representational State Transfer

b)

Remote Execution Service Transfer

c)

Reliable System Transport

d)

Response Engine Standard Template

2.

Which of the following is NOT a JavaScript data type?

a)

Undefined

b)

Number

c)

Float

d)

Boolean

3.

In React, what is the purpose of useEffect?

a)

To modify props

b)

To handle side effects

c)

To declare a variable

d)

To create a new component

4.

What is TypeScript mainly used for?

a)

Faster rendering

b)

Adding static typing to JavaScript

c)

Managing CSS

d)

Improving database performance

5.

What is the time complexity of binary search?

a)

O(n)

b)

O(log n)

c)

O(n²)

d)

O(1)

6.

Which Git command is used to upload local changes to a remote repository?

a)

git clone

b)

git pull

c)

git push

d)

git fetch

7.

What is the default port for HTTP?

a)

21

b)

25

c)

80

d)

443

8.

Which React hook is used for state management?

a)

useEffect

b)

useState

c)

useRef

d)

useMemo

9.

What is the main purpose of package.json?

a)

To define the structure of a component

b)

To list dependencies and project metadata

c)

To store API keys

d)

To define CSS styles

10.

What does SQL stand for?

a)

Standard Query Logic

b)

Simple Query Language

c)

Structured Query Language

d)

Secure Query List

11.

In Git, which command creates a new branch?

a)

git merge

b)

git commit

c)

git branch

d)

git fork

12.

What is the output of typeof null in JavaScript?

a)

null

b)

undefined

c)

object

d)

string

13.

What does CSS stand for?

a)

Computer Style Sheet

b)

Cascading Style Sheets

c)

Creative Style Syntax

d)

Custom Styling System

14.

Which keyword is used to create a class in JavaScript?

a)

object

b)

new

c)

class

d)

function

15.

What is a pure function?

a)

A function that uses async/await

b)

A function that returns the same output for the same input

c)

A function that modifies global variables

d)

A function that runs only once

16.

In React, keys are used to:

a)

Store API tokens

b)

Identify elements in a list

c)

Trigger re-render manually

d)

Manage local storage

17.

What is the purpose of Docker?

a)

For hosting websites

b)

For building native apps

c)

For containerizing applications

d)

For database backups

18.

Which of these is NOT part of the MVC architecture?

a)

Model

b)

View

c)

Component

d)

Controller