"\n" is a string escape sequence that inserts a line break, or newline into a string. As we can see, the entire output is one single string that has been constructed and logged. The line breaks help to organize the output.
object.address property is an array of four elements which we print out in two lines, first the street address on its own line, followed by the remaining info on the next. The first element is easy to target,
object.address, but the remaining are a little trickier if we are to do it with a single statement. That's where
array.slice() comes in. Consider,
[ el1, el2, el3, el4 ]
el1 already, so all we are interested in is el2..el4.
.slice() lets us make a shallow copy of an array from some starting index through some ending index, or in the case the end of the array.
el1 [ el2, el3, el4 ]
The shallow copy is still an array, just one element shorter. We use the
array.join() method to join these elements into a single string with comma separated values.