React help with excersise!

I have this code “solved”

const JSX = (
  <div>
    {/* remove comment and change code below this line */
    <h2>Welcome to React!</h2> <br />
    <p>Be sure to close all tags!</p>
    <hr />
   /* remove comment and change code above this line */}
  <div />
);

this is the excersise:

Fix the errors in the code editor so that it is valid JSX and successfully transpiles. Make sure you don’t change any of the content - you only need to close tags where they are needed.

there are the hints:

The constant JSX should return a div element.
The div should contain a br tag.
The div should contain an hr tag.

when I press Run test, nothing happen… Do I do something wrong?

Remove the comments where it says to maybe?

const JSX = (
  <div>
    {
    <h2>Welcome to React!</h2> <br />
    <p>Be sure to close all tags!</p>
    <hr />
  <div />
);

nothing happen

You’ve still left something lying around, you haven’t deleted everything. Check what the code looks like: it is fairly clear that there is something there that shouldn’t be there

I dont have nothing… I dont know what happen. Now , Im so frustrated :joy:

I solved, the only thing that I should remove was the “{}” inside the code

1 Like
  <div />

This is not the correct closing tag. It should be:

</div>