LastIndex returns the index of the last element in the array. It’s basically the same as using a length node and subtracting it with 1. The ForLoopReverse is just used to iterate over each element of the array and comparing each element one by one of the 2 arrays. Please note that this function will only work correctly when the Input and the Dictionary String have the same length. If you don’t make sure that they have the same length you better change the following: Instead of plugging in LastIndex of LocalInput plug in the minimum of the LastIndex of LocalInput and the LastIndex of LocalDict in the FirstIndex of the ForLoopReverse.
RemoveIndex removes the array element at a given Index. You want to remove those to make sure you don’t test them when you try to determine how many cows are there. Please note that removing elements within the loop is the reason why a ForLoopReverse is necessary.