I am trying to find an alternative to .join(). I want to remove the "," and add a space. This is the desired output for myArray: Hey there
// create a function that takes an array and returns a string
// can't use join()
// create array
const myArray = ["Hey", "there"];
/**
*
* @param {Array} input
* @returns {String}
*/
const myArraytoStringFunction = input => {
// for (var i = 0; i < input.length; i++) {
// ????
// }
return input.toString();
};
// call function
const anything1 = console.log(myArraytoStringFunction(myArray));