--- id: 587d7fae367417b2b2512be6 title: Render Images from Data Sources challengeType: 6 videoUrl: '' localeTitle: 从数据源渲染图像 --- ## Description
最后几个挑战表明,JSON数组中的每个对象都包含一个imageLink键,其值为cat图像的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)); ```
## Challenge Seed
```html

Cat Photo Finder

The message will go here

```
## Solution
```js // solution required ```