# Why does the contains note (for arrays) show true, even if the array doesnt contain that specific item?

**URL:** <https://forums.unrealengine.com/t/why-does-the-contains-note-for-arrays-show-true-even-if-the-array-doesnt-contain-that-specific-item/450028>\
**Category:** Audio\
**Tags:** logic, unreal-engine, Array, loop, Blueprint, question\
**Created:** [June 2, 2019, 11:50pm UTC](https://forums.unrealengine.com/t/why-does-the-contains-note-for-arrays-show-true-even-if-the-array-doesnt-contain-that-specific-item/450028 "2019-06-02T23:50:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DWB-Trew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DWB-Trew](https://forums.unrealengine.com/u/DWB-Trew)\
**Post date:** [June 2, 2019, 11:50pm UTC](https://forums.unrealengine.com/t/why-does-the-contains-note-for-arrays-show-true-even-if-the-array-doesnt-contain-that-specific-item/450028/1 "2019-06-02T23:50:32Z")

</div>

As you can see (img: sss.png), im checking if the array “words” contains the variable “word to add”  
and if the boolean is false, the variable shall be added to the array.

Im using a “for each loop” and the first check is as expected: false! (the array does not contain the item: 0)  
but the other 3 checks say: true! (appearently the array contains the item: 1, but i never added it.) Same with loop 2 and 3.

some infos:  
-i tried that function with a “for loop”  
-i also tried “add item to array”, but nothing changed  
-the array has already 4 empty elements.

Spent several hours so far. what im doing wrong?

thx for your help

---

<div class="post-metadata">

**Author:** ![DWB-Trew](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DWB-Trew](https://forums.unrealengine.com/u/DWB-Trew)\
**Post date:** [June 4, 2019, 8:38pm UTC](https://forums.unrealengine.com/t/why-does-the-contains-note-for-arrays-show-true-even-if-the-array-doesnt-contain-that-specific-item/450028/2 "2019-06-04T20:38:20Z")

</div>

solved it! The problem occures only when you use “text” arrays & execute a “contain” check. I switched to “string” array and it worked as expected!
