Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda JSX Variables & Nested Elements | Getting Started: JSX
Introduction to React

bookJSX Variables & Nested Elements

The simplest application is the variables. As explained in the previous chapter, we can store HTML elements into JavaScript variables. We can also store more complicated items like lists that include nested elements.

const element = <div>
<h1>Heading</h1>
<p>This is a paragraph. </p>
</div>

Task

Create a variable called myList and store an unordered list inside it. The list should have four list items having inner HTML equal to Item 1, Item 2, Item 3 and Item 4 respectively.

question-icon

Fill in the gaps.

const=




Clique ou arraste solte itens e preencha os espaços

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Suggested prompts:

Pergunte-me perguntas sobre este assunto

Resumir este capítulo

Mostrar exemplos do mundo real

Awesome!

Completion rate improved to 2.7

bookJSX Variables & Nested Elements

Deslize para mostrar o menu

The simplest application is the variables. As explained in the previous chapter, we can store HTML elements into JavaScript variables. We can also store more complicated items like lists that include nested elements.

const element = <div>
<h1>Heading</h1>
<p>This is a paragraph. </p>
</div>

Task

Create a variable called myList and store an unordered list inside it. The list should have four list items having inner HTML equal to Item 1, Item 2, Item 3 and Item 4 respectively.

question-icon

Fill in the gaps.

const=




Clique ou arraste solte itens e preencha os espaços

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 2
some-alt