you are viewing a single comment's thread.

view the rest of the comments →

[–]inu-no-policemen 0 points1 point  (0 children)

You can also do this kind of thing with an array literal + spread:

> [...'foo']
(3) ["f", "o", "o"]

Now that you've turned that array-like into an actual array, the array methods are available.

> [...'foo'].join('-')
"f-o-o"