0
I have a code where I pass a value and I need to check if that value exists within the array
, so I use the indexOf
. What I would like is to take the value that the indexOf
find, for example:
org = 3;
var array_t = [1,2,3,4,5];
receb = (array_t.indexOf(org));
In that case he will show that the 3 is in position 2. What I want is to take the amount 3. It is possible?
But you already have the 3, because you would want to catch the 3? '-'
– Paulo Roberto Rosa
Calm down. I’ve been redundant asking '-' I’ll redo myself here'
– Alexandre