Hi, I just finished this now and it seems to be working.
However when i use the split to bring it back to an array it looks like there is another item with no value added.
the reason why i use pop() before using join() to make the array back to a string.
Here’s my link - https://codepen.io/BobOy/pen/WNQYQVO
You’ve done really well here — this was quite a tough assignment. Your code works great, and you have used forEach() rather nicely.
In terms of the problem that caused you to use pop(). Your use of forEach is correct, but inside it you are building a new string that you then split. When you’ve built the string, you end up with a comma on the end of it. This is ecause for each item in the array, you are running this:
txt = txt + value + ' ('+ index +'),';
and you are not removing the comma at the end of it before you then split it.