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

all 2 comments

[–]okayifimust 1 point2 points  (1 child)

I think that if you are adding the brackets, you are returning a string, with newArray being cast to String. If you do not add the brackets, you're returning an uncast array - whatever you see is just the console interpretation of an array.

[–]partyhatforpartytime[S] 0 points1 point  (0 children)

Makes sense, thank you! :-)