7. String to array and back

7.7 Array to String using join

Array has a method called join. join converts the contents of an array into a String.

Execute the code below and you will see result as icecreamchocolatemovies. This does not look right. Scroll down to see the right solution.


In order to fix the issue with join we need to tell join to add space between the words as shown below.