Golden Mirage : trying to sort out coins (Javascript)

I’m sorry, but your code still isn’t formatted and it does make a difference.
Read this topic to explain it more:
[Essentials] How To Post/Format Your Code Correctly
P.S. Append is the same as push(). And from what I can see in your code it was better before, I’ll explain it more if you haven’t solved it.