function convertToStringArray(numbers) {
// Map each integer to a string
return numbers.map(num => num.toString());
}
const numbers = [1, 2, 3, 4, 5, 6];
// Convert the array of integers to a string array
const stringArray = convertToStringArray(numbers);
console.log("String array:");
stringArray.forEach(str => console.log(str));
/*
run:
String array:
1
2
3
4
5
6
*/