---
id: 5d8a4cfbe6b6180ed9a1ca68
title: Part 137
challengeType: 0
---
## Description
At the top of the function create a new `const` named `index`. You are going to use it to find the item in the `data` array with the year that is passed to the function.
Use JavaScript's `findIndex` function to set your `index` variable to the index of the item in the `data` array where the year is the same as the year passed to your `drawDashboard` function. Here's an example:
```js
array.findIndex(d =>
// find the index where the year passed to
// drawDashboard equals the year of the array
)
```
After this, you will be able to use `data[index]` to get that item in the array.
## Instructions
## Tests
```yml
tests:
- text: test-text
testString: const script = $('.dashboard').siblings('script')[1].innerHTML; assert(/var index = data.findIndex\(function \(d\) \{\s*return (year === d\.year|d.year === year);\s*\}\);/g.test(script));
```
## Challenge Seed
```html
```
### Before Test
## Solution