Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript convert string to character array

// V1
const word = "abcd";
const characterArray = word.split(""); // ["a", "b", "c", "d"]

// V2
[...word] // ["a", "b", "c", "d"]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #convert #string #character #array
ADD COMMENT
Topic
Name
7+9 =