
FSD Quiz-2

Quiz
•
Computers
•
University
•
Medium

Varalaxmi P N V
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which one is a correct way of sending the value 'John' via the 'firstname' property to the Person component?
root.render(<Person firstname='John' />);
root.render(<Person props(firstname='John') />);
root.render(Person(firstname='John'));
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which is a correct way of receiving, and using a prop named firstname, in a function class?
function Person(firstname) {
return <h2>My name is { firstname }!</h2>;
}
function Person(props) {
return <h2>My name is { props.firstname }!</h2>;
}
Both of the above is correct
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In React, which is a correct way of adding a mouseover event to trigger a function called 'run_now'?
<div onmouseover='run_now()'>Lorum Ipsum</div>
<div onMouseover='run_now'>Lorum Ipsum</div>
<div onMouseover={run_now}>Lorum Ipsum</div>
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which one of these two code blocks is a correct way of adding a conditional statement in React?
function Glass() {
return (
<>
{5 > 2 && <h2>Hello</h2> }
</>
);
}
function Glass() {
return (
<>
{5 > 2 &&} <h2>Hello</h2>
</>
);
}
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Consider the following code:function Family() {
const names = ['Jane', 'John', 'Mike'];
return (
<>
<ul>
{names.map((x) => <li>{x}</li>)}
</ul>
</>
);
What will be the return value?
Jane
John
Mike
Jane
Jane
Jane
Jane
6.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Complete this statement to include a click event handler.
k Me!</button>
}>Click Me!</button>
<button _________={handle} <click me></button>
7.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Add the attribute that allows React to keep track of elements in lists.
function GroceryList() {
const items = [
{id: 1, name: 'bread'},
{id: 2, name: 'milk'},
{id: 3, name: 'eggs'}
];
return (
<>
<h1>Grocery List</h1>
<ul>
{items.map((item) => <li _____ ={item.id}>{item.name}</li>)}
</ul>
</>
);
}
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<GroceryList />);
Create a free account and access millions of resources
Similar Resources on Wayground
5 questions
Evaluación diagnóstica Tecnologías web

Quiz
•
University
15 questions
Javascript Array dan Object

Quiz
•
University
10 questions
KOD ARAHAN HTML 2

Quiz
•
1st Grade - University
15 questions
ARRAYLIST - JAVA

Quiz
•
University
15 questions
Java Programming

Quiz
•
University
10 questions
KNTT 12 BÀI 13

Quiz
•
12th Grade - University
12 questions
css

Quiz
•
University
15 questions
Web Development Revision 1

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University