JSFiddle - React, Tailwind, and code Playground
JavaScript
const int = 5; // 可変
let result = [];
for (let i=0.1; i<1; i+0.1) {
const num = int + i;
result.push(num);
}
console.log(result); // 右記の配列を得たい [5.1, 5.2, 5.3, 5.4, 5.5, 5.6, 5.7, 5.8, 5.9];