Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript convert string to character array

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

// V2
[...word] // ["a", "b", "c", "d"]
 
PREVIOUS NEXT
Tagged: #typescript #convert #string #character #array
ADD COMMENT
Topic
Name
6+6 =