Search Header Logo

React & JS - Day 5 - KEC

Authored by Raja SK

Other

Professional Development

12 Questions

Used 2+ times

React & JS - Day 5 - KEC
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

const arr = [1,2,3]

const {a, b, c} = arr

console.log(a)

1

undefined

null

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you destructure an object in JavaScript?

const { name, age } = { person };

const { name, age } = person;

const { name: name, age: age } = person;

const [name, age] = person;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which React Hook is used to perform side effects in a functional component?

useState

useSideEffect

useEffect

useFetch

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What array method is used to remove the first element from an array?

pop()

shift()

slice()

unshift()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

const arr = [1,2,3]

const [a: x, b, c] = arr

console.log(x)

1

undefined

null

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What array method is used to check if all elements in an array pass a certain condition?

verifyAll()

every()

checkAll()

all()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which React Hook is used to create a state variable in a functional component?

createState()

useState()

setState()

setName()

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?