Help Wanted for Array 3

Hi, I am having a little bit of challenge with this particular exercise, I am a little bit confused. I have given my best but seems something wasn’t clicking. Though here is my solution, Array 3 Solution Codepen

Link to Excercise

Kindly give your feedback. Thanks in advance :pray:

Hello @Olixpin

The pop() and push() code is correct. :tada:

Regarding the loop:
Your first step to create the new element inside the loop is correct. The line // Don't edit the code below here! does also mean we are not allowed to copy this code into our own code. These “untouchable” lines of code tell us the exercise expects a single string of all the data from the array inside the variable myString.

I took the correct parts of your loop and added some pseudo code to help you understand the steps:

for(let i = 0; i < myArray.length; i++) {
  const value = `${myArray[i]} ${i}`
  /* Set the current array element to the new value */

/* Use the join() method of the array to create the myString variable */

Try to replace each of my comment lines with a single assignment. The resulting code is simpler than you may think. So don’t think to far. I hope that gives you enough support to solve the tasks. If not, just ask. :slightly_smiling_face:

Happy coding,