---
title: "Comment by Bence Hornyák on \"JavaScript check if array contains a value\" | Hashnode"
description: "Great post! I think you may have made a typo by accident here: cost role = &#x27;user&#x27; ;"
url: "https://hashnode.com/posts/javascript-check-if-array-contains-a-value/61f262f3805bdf3ebd486fbd/comment/61f2d6c322a38747671d6b7a"
---

[Discussion](https://hashnode.com/posts/javascript-check-if-array-contains-a-value/61f262f3805bdf3ebd486fbd)

Comment [JavaScript check if array contains a value](https://hashnode.com/posts/javascript-check-if-array-contains-a-value/61f262f3805bdf3ebd486fbd)

[Bence Hornyák](https://hashnode.com/@benceHornyak)

[Jan 27, 2022](https://hashnode.com/posts/javascript-check-if-array-contains-a-value/61f262f3805bdf3ebd486fbd/comment/61f2d6c322a38747671d6b7a)

Great post!

I think you may have made a typo by accident here:

```
cost role = 'user';
```

[Chris Bongers](https://hashnode.com/@dailydevtips)

[Jan 28, 2022](https://hashnode.com/posts/javascript-check-if-array-contains-a-value/61f262f3805bdf3ebd486fbd/comment/61f2d6c322a38747671d6b7a#reply-61f390b452c78247427494d3)

Yep, thanks for noting that, fixed it
