Categories
JavaScript Answers

How to get character array from a string with JavaScript?

Spread the love

To get character array from a string with JavaScript, we use the spread operator.

For instance, we write

const arr = [...str];

to spread the str string into a character array with the spread operator.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published.