DEV Community


Discussion on: Es6 🆕 Js Array Methods You may not know about

hymanaharon profile image
Aharon Hyman

One of the methods I recently started using and now seem to need it more than ever is .join()

The join() method creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string. If the array has only one item, then that item will be returned without using the separator.

easyvipin profile image
Vipin Chandra Author

Yeah join() and toString() are some of the better methods to work with strings in array.