jeudi 29 janvier 2015

Finding index of value in array


Vote count:

0




I'm currently learning Ruby and for training purpose I wanted to extand the Array Class with a own method, that checks a array for a certain value and returns its index. If the value has more than one index in the array return all the indexes.


I tried to solve this problem with some loops and some relational operators but I'm not very fit in working with the array class. If anybody could give me a solution for this quest on which I could orientate, that'd be great.



asked 6 mins ago







Finding index of value in array

Aucun commentaire:

Enregistrer un commentaire