954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

indexes of 2 arrays

EDIT: solved, i was missing a bit of code :L

sowheredoigo
Newbie Poster
1 post since Feb 2011
Reputation Points: 10
Solved Threads: 0
 

why do you set a variable indexWhereFound?
i think you mean indexFound?

{
    var indexFound = -1;
    for (var position = 0; position < valueArray.length; position = position + 1){
        if (valueArray[position] == value){
            indexFound = position;}
    }
    return indexFound;
}
Agarsia
Junior Poster
114 posts since Feb 2011
Reputation Points: 10
Solved Threads: 25
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: