format

Returns a string with a language-specific representation of the list.

Parameters

list
  • An iterable object, such as an Array.

Throws

TypeError if list includes something other than the possible values.