membentuk array dari I ke J JavaScript

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