function calculateNumbers(input1, input2) {
let numbersList = [];
for (let i = input1; i <= input2; i++) {
numbersList.push(i);
}
return numbersList;
}
let generatedNumbers = calculateNumbers(0, 10);
console.log(generatedNumbers);
I am trying to display the list of numbers as a string like 0,1,2,3,4,5
. However, I am facing difficulty in converting it from an array. Currently, my output shows as [0,1,2,3,4,5]
.