Modify the function to transform the given string into an arraywhere each character in the array is in the same index as it was inthe string, and return it.
function convertStringToArray(s) {
/* Do not modify code below this line */
const exampleString = ‘hello’;
const stringAsArray = convertStringToArray(exampleString);
console.log(stringAsArray, ‘<– should be [“h”, “e”, “l”,”l”, “o”]’);
Expert Answer
An answer will be send to you shortly. . . . .