Answers for "tochararray in javascript"

1

tochararray in javascript

// there is not toCharArray() function in javascript .. 
// if you want to split string into char array .. then do this method.. 

let name="hello";
let charArray=name.split(''); // this split string into char ..
console.log(charArray); // output: ['h','e','l','l','o']
Posted by: Guest on May-21-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language