Here is what I want:
I have first
array and I have the index
as below:
const first = ['a','b','c'];
const index = 1; // the index of b
const shuffled = ['c','a','b']; // now the index of b is 2
In the first
array the index
points to the second element in the array which is b
right?
Now I shuffled the first
array and we have the shuffled
array .
The index of b
is 2 right now. I want to return this new index...