# I need some help with Arrays

**URL:** <https://forum.kirupa.com/t/i-need-some-help-with-arrays/191160>\
**Category:** Uncategorized\
**Created:** [June 17, 2006, 11:54pm UTC](https://forum.kirupa.com/t/i-need-some-help-with-arrays/191160 "2006-06-17T23:54:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![woad](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@woad](https://forum.kirupa.com/u/woad)\
**Post date:** [June 17, 2006, 11:54pm UTC](https://forum.kirupa.com/t/i-need-some-help-with-arrays/191160/1 "2006-06-17T23:54:26Z")

</div>

So, i’m making a military command type game and I’m using arrays to hold what’s in the armies of the game. So let’s say there’s a unit array of all the different units in my army. Units = [“Pikemen”, “Swordsmen”] . How would I give properties to one of them? Say I need to change the amount of swordsmen I have after a battle and also give them more experience.  
Would it be something like units[1].exp += 50 ?

Or maybe, should I not be using arrays at all?
