profileRyan KesPGP keyI build stuffEmailGithubTwitterLast.fmMastodonMatrix

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" ]