Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Using strings, the spread operator creates an array with each char in the string

const hey = 'hey'
const arrayized = [...hey] // ['h', 'e', 'y']
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #Using #spread #operator #creates #array #char #string
ADD COMMENT
Topic
Name
1+4 =