DEV Community

Discussion on: String To Array In One Line : JavaScript

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

Depends really why you want to convert it? Since a string is already iterable, for a lot of use cases the conversion is not necessary

Collapse
 
akashkava profile image
Akash Kava

And all of array methods are generic and can be called on string with call or apply.

Collapse
 
shivamkapasia0 profile image
shivamkapasia0

Agreed!