function convertArrayOfIntegersToString(arr) {
let result = [];
for (let i = 0; i < arr.length; i++) {
result.push(arr[i]);
result.push(" ");
}
return result.join('').trim();
}
const arr = [5, 8, 12, 800, 3907];
const s = convertArrayOfIntegersToString(arr);
console.log(s);
/*
run:
5 8 12 800 3907
*/