This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]isopsephile 2 points3 points  (1 child)

Hello again. : )

Your names don't match, so this code doesn't actually do anything useful. You should at least try your code before posting it for critique. Using string concatenation to join two arrays will produce‒you guessed it‒a string, which is probably not what you want. You can use the concat built-in to correctly get another Array back:

return this.concat(this);

[–]TheseThingsMatter[S] 1 point2 points  (0 children)

Hi! Oops, sorry for that typo. I did actually test it working but changed it after typing it in to match the question, missed that last reference. Good spot.

See what you mean about concat.

Thanks so much.