split string by character code example
Example 1: js split string
var myString = "Hello World!";
var splitWords = myString.split(" ");
var hello = splitWords[splitWords.indexOf("Hello")];
Example 2: 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);
Example 3: how to saperate string to array
Scanner in=new Scanner(System.in);
String input=in.nextLine();
String[] word=input.split(" ");