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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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…

How well did you know this?
1
Not at all
2
3
4
5
Perfectly