function stringToArray(string){
const arr = string.split(" ");// add space in between qoutes to avoid splits every letters in string
return arr
}
//splitting
const str = stringToArray('hello world!');
console.log(str); //output: [ 'hello', 'world!' ]