--- id: 587d7fae367417b2b2512be6 challengeType: 6 forumTopicId: 18265 title: 渲染数据源的图像 --- ## Description
前几个挑战中表明,JSON 数组中的每个对象都包含一个imageLink键,其值为猫图像的 URL。 当你遍历这些对象的时候,你可以使用imageLink属性在img元素中显示此图像。 这是执行此操作的代码: html += "<img src = '" + val.imageLink + "' " + "alt='" + val.altText + "'>";
## Instructions
添加代码以在img标签中使用imageLinkaltText属性。
## Tests
```yml tests: - text: 你应该使用imageLink属性来显示图像。 testString: assert(code.match(/val\.imageLink/g)); - text: 应该用 altText 做为图片的 alt 属性。 testString: assert(code.match(/val\.altText/g)); ```
## Challenge Seed
```html

Cat Photo Finder

The message will go here

```
## Solution
```html

Cat Photo Finder

The message will go here

```