The
push
method can be used to add values to the end of an array. The pop
method does the opposite: it removes the value at the end of the array and returns it. An array of strings can be flattened to a single string with the join
method. The argument given to join
determines the text that is glued between the array’s elements.