JavaScript String To Array Conversion
Description
Strings can be converted into arrays with the spread operator:
Syntax
const chars = [..."abc"]
console.log(chars) // Array(3) [ "a", "b", "c" ]
Strings can be converted into arrays with the spread operator:
const chars = [..."abc"]
console.log(chars) // Array(3) [ "a", "b", "c" ]