Fix the code

Report a typo

The code snippet below contains a React component that renders a simple article, but some parts are missing.

const App = ... (
  <article>
    <Heading ...="article-heading">Title</...>
    <main>
        <Content backgroundColor="gray" ...
    </main>
  </article>
)

Select the option that contains the correct code.

A)

const App => () (
  <article>
    <Heading style="article-heading">Title</heading>
    <main>
        <Content backgroundColor="gray">
    </main>
  </article>
)

B)

const App = () => (
  <article>
    <Heading color="article-heading">Title<Heading/>
    <main>
        <Content backgroundColor="gray"</>
    </main>
  </article>
)

C)

const App = () => (
  <article>
    <Heading className="article-heading">Title</Heading>
    <main>
        <Content backgroundColor="gray" />
    </main>
  </article>
)

D)

const App = () => (
  <article>
    <Heading id="article-heading">Title />
    <main>
        <Content backgroundColor="gray" />
    </main>
  </article>
)
Select one option from the list
___

Create a free account to access the full topic