Search Header Logo

React 2

Authored by Guilherme Craveiro

Computers

1st - 5th Grade

Used 1+ times

React 2
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Enter the correct ReactDOM method to render the React element to the DOM:


ReactDOM._________(myElement, document.getElementById('root'));

render

useState

react

root

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Complete this arrow function:


hello = ______ "Hello World!";

() =>

=>

(something) =>

() =

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Select a variable that cannot be changed.


______ x = 5.6;

const

let

int

float

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Select the array method that will allow you to run a function on each item in the array and return a new array.


const myList = myArray._______((item) => <p>{item}</p>)

map

list

runArray

newArray

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Use destructuring to extract only the third item from the array, into a variable named suv.


const vehicles = ['mustang', 'f-150', 'expedition'];


const [______] = vehicles;

, , suv

3

2

'expedition'

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Use the spread operator to combine the following arrays.


const arrayOne = ['a', 'b', 'c'];


const arrayTwo = [1, 2, 3];


const arraysCombined = [________________];

'a','b','c',1,2,3

arrayOne,arrayTwo

...arrayOne, ...arrayTwo

arrayOne + arrayTwo

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Render a <p> element without using JSX.


const paragraph = React.createElement(_____, {}, 'This is a paragraph without using JSX!');

p

c

<p>

paragraph

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?