Predict JSX Expression Output
Predict Output Beginner
Question
What does this JSX render?
Code
const name = "Ada";
const element = <h1>Hello, {name}!</h1>;
// What text appears in the browser?
Hint
The curly braces embed the JavaScript variable into the markup.
Explanation
JSX curly braces {name} evaluate the JavaScript expression and insert the result. Since name is "Ada", the rendered text is "Hello, Ada!".
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.