split string into words js code example
Example 1: javascript split
var arr = ['hey', 'nay', 'wey'];
var let = arr.split(' ');
console.log(let);
Example 2: how to saperate string to array
Scanner in=new Scanner(System.in);
String input=in.nextLine();
String[] word=input.split(" ");