Hi I am having string called 'santhosh'. I wish to split this text as 's,a,n,t,h,o,s,h' using javascript. Is it possible? And want to save it in an array.
And I wish to check whether the splitted character is string or Numeric is it possible?
You can use an empty string as the separator argument of the split method:
var array = "santhosh".split('');
// ["s", "a", "n", "t", "h", "o", "s", "h"]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With