title: Is there a JS function that acts like IntStream in Java?
body: <p>In Java8, we can get a stream of numbers in a range like:</p>
  
  <pre><code>IntStream.range(1, 3).forEach(System.out::println);
  IntStream.rangeClosed(1, 3).forEach(System.out::println);
  </code></pre>
  
  <p>How can I get a array in JS like <code>[1, 2, 3]</code> with minimum of coding?</p>
  
  <p>The question comes out when I'm solving this: <a href="https://leetcode.com/problems/fizz-buzz/#/description" rel="noreferrer">LeetCode 412. Fizz Buzz</a></p>