Add Comments in JSX
JSX is a syntax that gets compiled into valid JavaScript. Sometimes, for readability, you might need to add comments to your code. Like most programming languages, JSX has its own way to do this.
To put comments inside JSX, you use the syntax {/* */}
to wrap around the comment text.
The code editor has a JSX element similar to what you created in the last challenge. Add a comment somewhere within the provided div
element, without modifying the existing h1
or p
elements.
Tests
- Waiting: 1. The constant
JSX
should return adiv
element. - Waiting: 2. The
div
should contain anh1
tag as the first element. - Waiting: 3. The
div
should contain ap
tag as the second element. - Waiting: 4. The existing
h1
andp
elements should not be modified. - Waiting: 5. The
JSX
should use valid comment syntax.
/** * Your test output will go here */