7. Attributes in JSX, stuck

  1. Declare a constant named p1.

Set p1 equal to a JSX

element. Write the word foo in between the tags.
2. On the next line, declare a constant named p2.

Set p2 equal to another JSX

element. Write the word bar in between the tags.
3. Give the first an id attribute of “large”.

Give the second

an id attribute of “small”.

Number 3 has me stopped.
I learned advanced JS algorithms at FreeCodeCamp, and am a bit miffed.

const p1 =


const p2 =



did you mean

    const p1 = <p id="large">foo</p>;
    const p2 = <p id="small">bar</p>;

I’m assuming it wants you to use <p> tag. You can link to exercise for further help.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.