Predict Props Rendering
Predict Output Easy
Question
What does this render?
Code
function Greeting({ name, age }) {
return <p>{name} is {age}</p>;
}
<Greeting name="Bob" age={25} />
Hint
Props are destructured and rendered in the JSX.
Explanation
The Greeting component receives name="Bob" and age={25} as props. These are destructured and rendered inside the <p> tag, producing "Bob is 25".
Related Resources
Related Lessons
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.