string split by character code example
Example 1: javascript explode
var str = "Well, how, are , we , doing, today";
var res = str.split(",");
Example 2: split a message js
const message = 'This is a test'
var args = message.split(' ');
console.log(args[0])
console.log(args[1])
console.log(args[2])
console.log(args[3])
Example 3: split string
const str = 'The quick brown fox jumps over the lazy dog.';
const words = str.split(' ');
console.log(words[3]);
const chars = str.split('');
console.log(chars[8]);
const strCopy = str.split();
console.log(strCopy);