# Array data

**URL:** <https://forum.kirupa.com/t/array-data/204548>\
**Category:** Uncategorized\
**Created:** [October 20, 2006, 6:07pm UTC](https://forum.kirupa.com/t/array-data/204548 "2006-10-20T18:07:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dhryn](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@Dhryn](https://forum.kirupa.com/u/Dhryn)\
**Post date:** [October 20, 2006, 6:07pm UTC](https://forum.kirupa.com/t/array-data/204548/1 "2006-10-20T18:07:11Z")

</div>

I have an array which looks abit like this.  
newArray = [“enemy2”,“enemy0”,“partyMember1”,“enemy3”];

is there away to brak the string up so that I can check if a word is in it.  
e.g  
if(newArray[0] contains “enemy”){  
//runs this code  
}else{  
//run this code  
}

any help would be great
