turn strign into array code example
Example 1: string to char array in javascript
const string = 'hi there';
const usingSplit = string.split('');
const usingSpread = [...string];
const usingArrayFrom = Array.from(string);
const usingObjectAssign = Object.assign([], string);
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: string to array javascript
const string = "Hello!";
console.log([...string]);