# Index of array entry?

**URL:** <https://community.freefem.org/t/index-of-array-entry/2755>\
**Category:** General Discussion\
**Created:** [October 20, 2023, 2:19pm UTC](https://community.freefem.org/t/index-of-array-entry/2755 "2023-10-20T14:19:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jna1g18](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jna1g18](https://community.freefem.org/u/jna1g18)\
**Post date:** [October 20, 2023, 2:19pm UTC](https://community.freefem.org/t/index-of-array-entry/2755/1 "2023-10-20T14:19:06Z")

</div>

Hi all, is it possible to determine the index of a particular entry in a 1 dimensional array (i.e. a list)? E.g if I had an array A=[3,2,8,22,1], is there a function that would give the index of a chosen entry, maybe something like A.index(2)=1?  
Many thanks!

---

<div class="post-metadata">

**Author:** ![frederichecht](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/frederichecht/32/15_2.png) [@frederichecht](https://community.freefem.org/u/frederichecht)\
**Post date:** [October 21, 2023, 1:32pm UTC](https://community.freefem.org/t/index-of-array-entry/2755/2 "2023-10-21T13:32:19Z")

</div>

not to day , because it is a too long O(n)) where n is the size of the array.
