---
# System prepended metadata

title: Helping Zhuoda

---

# Helping Zhuoda

Hi Zhuoda,
I'm sorry it took me so long to respond further. Perhaps you may have solved this already! If so, great! If not, here is my first look at it.

I think the problem lies in **line 5**, the `hasOwnProperty` method should have "curly" braces `(  )` instead of "square" brackets `[ ]`.That will at least allow the method to output correctly. However, the `hasOwnProperty` method is not actually the one I think you should use. It only checks if an object has a specific property and not a specific value. See this [link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty). 

In the link, the example shows that the method checks if the *name* of a property is there, it doesn't care what the *value* of the property is. That's why the example is not checking for the number 42, its looking for the name "property1".

I haven't found a substitute method that you can use but I will keep looking. You could search through the arrays within your array by putting another for loop with your first for loop. Maybe try that and let me know how that goes. I will keep searching for an easy method to to use as well as test out a nested for loop for you.





One minute after this I Googled "how to check for a value in array javascript" and came across the [includes() method](https://www.w3schools.com/jsref/jsref_includes_array.asp). Just replace `hasOwnProperty` with this and you will be good! Don't forget you need the `===` in the `if` statement for it to work properly.