former un tableau de i à j javascript

Array.from({ length: to-from+1 }, (_, i) => from + i)
Elegant Elk