1×
Become a member
to unlock all features
Autoplay

    Combine Values of an Array into a String with Join

    javascriptJavaScript

    The join() method joins all elements of an array into a string. In this lesson we first look at why join is often a better option than regular string concatenation. Then we move onto an example which shows a simple way of storing lines of text in an array and outputting them with a new line separator and we finish by looking at ways to chain multiple array methods together.