Create a Complex JSX Element

Tell us what’s happening:

Your code so far


// write your code here

const JSX = <div>{
<h1>
<p>
<ul>
<li>Paragraph One</li>
<li>Paragraph Two</li>
<li>Paragraph Three</li>
</ul>
</p>
</h1>
}
</div>;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/front-end-libraries/react/create-a-complex-jsx-element

I’m not sure how they are asking me to nest the elements?Are they all supposed to be inline?

I did this and it worked!

// write your code here

const JSX=
<div>
<h1>foo</h1>
<p>bar</p>
<ul><li>foo</li><li>bar</li><li>foo</li></ul>
</div>
1 Like

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)