react how to create range

JavaScript
const numbers = Array.from(Array(10).keys());
Source

Also in JavaScript: