This is the question
For this final array task, we provide you with a starting array, and you will work in somewhat the opposite direction. You need to:
Remove the last item in the array.
Add two new names to the end of the array.
Go over each item in the array and add its index number after the name inside parentheses, for example Ryu (0) . Note that we don’t teach how to do this in the Arrays article, so you’ll have to do some research.
Finally, join the array items together in a single string called myString , with a separator of " - ".
You can use pluses to build strings in JavaScript from variable values an literal text.
This line
myArray[i] = myArray[i]+' '+'('+i+')';
essentially means: "Take the array value add a space, a parenthesis, the index and another parenthesis. Then save everything into to same variable. That’s how “Ryu” becomes the new string “Ryu (0)”.
In modern JavaScript you would rather use a template literal to make it easier to read: