Course Solutions Uncategorized (Solved) : Modify Function Transform Given String Array Character Array Index String Return Function Q37457545 . . . .

(Solved) : Modify Function Transform Given String Array Character Array Index String Return Function Q37457545 . . . .

 

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. . . . .

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post