Search Header Logo

JavaScript and React Quiz

Authored by Karnam Bharath

Professional Development

University

Used 2+ times

JavaScript and React Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be logged? console.log(typeof null);

"null"

"undefined"

"object"

"string"

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the primary purpose of useState in React?

To create static variables

To manage state in functional components

To modify the DOM directly

To fetch data from APIs

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which HTTP method is commonly used for updating existing data in REST APIs?

GET

POST

PUT

DELETE

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does fetch() return in JavaScript?

A resolved value

A callback function

A Promise

An XML object

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a class in JavaScript?

function MyClass() {}

class MyClass {}

new class MyClass {}

MyClass() => {}

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of these is a pure function?

A function that modifies global variables

A function that always returns the same output for the same input

A function that depends on Math.random()

A function that performs AJAX requests

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the default return value of a JavaScript function if no return statement is provided?

null

undefined

0

""

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?