Question: Write a function named "find\_value" that takes a key-value store as a parameter with strings as keys and integers as values. The function returns a boolean representing true if the value 7 is in the input as a value, false otherwise. (My code below)

```
function find_value(key){
    for (var i of Object.values(key)){
        if (i == 7){
            return true;
        }
        else{
            return false;
        }
    }
}

```

When I call with the input `[{'effort': 4, 'doctrine': 8, 'item': 11, 'behavioral': 7, 'occasional': 11}]`, I should get `true`, but I am getting `false` instead. What am I doing wrong?

Answer: 
Your loops is returning false on your first item, most likely.
You should keep the condition and return true statement in the loop, but after the loop you should return false.

P.S. You should name your parameter and set a default value for good practice. I renamed it in my example below.

```
function find_value(myObject = {}){
    for (var i of Object.values(myObject)){
        if (i == 7){
            return true;
        }
    }
    return false;
}

```
You have 2 problems here:

1. You are passing an array with an object inside.
2. In else you are returning false, so function will test only the first value.

BTW it could be done this way:

```
return Object.values(obj).includes(7);

```