--- id: 5a24bbe0dba28a8d3cbd4c5e title: Add Comments in JSX localeTitle: Añadir comentarios en JSX challengeType: 6 isRequired: false --- ## Description
JSX es una sintaxis que se compila en JavaScript válido. A veces, para facilitar la lectura, es posible que necesite agregar comentarios a su código. Como la mayoría de los lenguajes de programación, JSX tiene su propia manera de hacer esto. Para colocar comentarios dentro de JSX, usa la sintaxis {/* */} para envolver el texto del comentario.
## Instructions
El editor de código tiene un elemento JSX similar al que creaste en el último desafío. Agregue un comentario en algún lugar dentro del elemento div proporcionado, sin modificar los elementos h1 o p existentes.
## Tests
```yml tests: - text: La constante JSX debe devolver un elemento div . testString: 'assert(JSX.type === "div", "The constant JSX should return a div element.");' - text: El div debe contener una etiqueta h1 como el primer elemento. testString: 'assert(JSX.props.children[0].type === "h1", "The div should contain an h1 tag as the first element.");' - text: El div debe contener una etiqueta p como el segundo elemento. testString: 'assert(JSX.props.children[1].type === "p", "The div should contain a p tag as the second element.");' - text: El JSX debe incluir un comentario. testString: 'getUserInput => assert(getUserInput("index").includes("/*") && getUserInput("index").includes("*/"), "The JSX should include a comment.");' ```
## Challenge Seed
```jsx const JSX = (

This is a block of JSX

Here's a subtitle

); ```
### After Test
```js console.info('after the test'); ```
## Solution
```js const JSX = (

This is a block of JSX

{ /* this is a JSX comment */ }

Here's a subtitle

); ```