Prac quiz on React.js

Prac quiz on React.js

University

14 Qs

quiz-placeholder

Similar activities

SS2425 WMAD S6+L17 Quiz Time

SS2425 WMAD S6+L17 Quiz Time

University

10 Qs

АКТ 1508-23 (4-топша)

АКТ 1508-23 (4-топша)

University

15 Qs

JS_CB_1_CNTT22

JS_CB_1_CNTT22

University

16 Qs

Examen de Entrada de Desarrollo de Aplicativos

Examen de Entrada de Desarrollo de Aplicativos

University

10 Qs

Tin 8 - Câu lệnh điều kiện

Tin 8 - Câu lệnh điều kiện

University

18 Qs

SQL Essential

SQL Essential

University

18 Qs

Review

Review

University - Professional Development

15 Qs

Quiz 2: C++ Basics

Quiz 2: C++ Basics

University

11 Qs

Prac quiz on React.js

Prac quiz on React.js

Assessment

Quiz

Computers

University

Easy

Created by

jacob valeros

Used 14+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. What will the following JSX code snippet render if isLoggedIn is "Hello"?

<p>Welcome, User!</p>


<p>Hello, User!</p>


Error


Nothing


2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. How do you render a list of items stored in an array called items in React.js?

[items.map(item => <Item>[item]</item>)]


[items.map(items => <Item key=[item.id]>[item.name]</item>)]


{items.map(item => <Item key={item.id}>{item.name}</Item>)}


<[DemList]>[items]</ItemList>


3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

It is a special attribute you should include when mapping over arrays to render data.

index


id

props

key

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The comments in React/JSX are similar to JavaScript Multiline comments but are wrapped in curly braces.

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of using keys when conditionally rendering a list of components in React?

To determine the order of rendering


To improve performance

To apply conditional styling to components


To apply conditional styling to components


6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following correctly demonstrates array destructuring?

{a,b}={1,2}

[a,b]={1,2}

[a,b]=[1,2,3]

{a,b}=[1,2,3]


7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code?

const arr1 = [1, 2, 3];

const arr2 = [...arr1, 4, 5];

console.log(arr2.length);


5

3

4

2

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?