
FSD Quiz-2
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Varalaxmi P N V
Used 2+ times
FREE Resource
Enhance your content in a minute
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
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
15 questions
MS. Excel
Quiz
•
12th Grade - University
10 questions
Listen in Python
Quiz
•
University
13 questions
Chap 1: What is a program made of?
Quiz
•
University
10 questions
MS Excel - Day 04
Quiz
•
University
10 questions
Arduino TP02
Quiz
•
University
14 questions
Power Point klasa V
Quiz
•
4th Grade - University
10 questions
cp06-01-1D-Array
Quiz
•
University
12 questions
TES AWAL MODUL 2
Quiz
•
University
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Computers
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
20 questions
christmas songs
Quiz
•
KG - University
20 questions
Holiday Trivia
Quiz
•
9th Grade - University
15 questions
Holiday Movies
Quiz
•
University
14 questions
Christmas Trivia
Quiz
•
3rd Grade - University
20 questions
Christmas Trivia
Quiz
•
University
8 questions
5th, Unit 4, Lesson 8
Lesson
•
KG - Professional Dev...
20 questions
Disney Trivia
Quiz
•
University
