{/* */}
来包含注释文本。 div
元素中的某处添加注释,而不修改现有的h1
或p
元素。 JSX
应该返回一个div
元素。
testString: 'assert(JSX.type === "div", "The constant JSX
should return a div
element.");'
- text: div
应包含一个h1
标记作为第一个元素。
testString: 'assert(JSX.props.children[0].type === "h1", "The div
should contain an h1
tag as the first element.");'
- text: div
应该包含一个p
标签作为第二个元素。
testString: 'assert(JSX.props.children[1].type === "p", "The div
should contain a p
tag as the second element.");'
- text: JSX
应该包含一条评论。
testString: 'getUserInput => assert(getUserInput("index").includes("/*") && getUserInput("index").includes("*/"), "The JSX
should include a comment.");'
```
Here's a subtitle