Array Methods Flashcards
(2 cards)
1
Q
How do you create a list of strings out of an array of items?
A
.toString() will return the array items as a list of strings separated by commas (no spaces)
2
Q
How do you create a list of strings out of an array of items while specifying what to use to separate them?
A
.join(“ ,”) for example or .join(“ * “) etc…