
FSD Quiz-2
Authored by Varalaxmi P N V
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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 />);
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Teste python- Unesp-Jaboticabal
Quiz
•
University
15 questions
07 - Map
Quiz
•
University
15 questions
Microcontroller
Quiz
•
University
10 questions
pointers and structures
Quiz
•
University
12 questions
PSSI Chp 1 dan 2
Quiz
•
University
15 questions
cmd and terminal
Quiz
•
7th Grade - University
15 questions
ASK T3 2.1 Kriptografi dalam Keselamatan Data
Quiz
•
University
15 questions
CIS1101-programming practice
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Computers
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
20 questions
Endocrine System
Quiz
•
University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
30 questions
W25: PSYCH 250 - Exam 2 Practice
Quiz
•
University
5 questions
Inherited and Acquired Traits of Animals
Interactive video
•
4th Grade - University
20 questions
Implicit vs. Explicit
Quiz
•
6th Grade - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
38 questions
Unit 8 Review - Absolutism & Revolution
Quiz
•
10th Grade - University