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