title: convert number to array in javascript | typescript for angular7
body: <p>i have a number 10 how to convert to this to number array in java script.
  answer should be <code>[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]</code></p>
  
  <p>OR How to convert number(10) to number of items in array in javascript</p>