JS functional programming for n items populate

This question already has an answer here:

  • Functional approach to basic array construction

    5 answers

  • How can I find matching values in two arrays?
  • How to check if jQuery object exist in array?
  • Removing value from array on specific location
  • Could someone help describe the two types of array storage in Javascript?
  • Displaying all possible combinations of alphabets from a dataset for a given input number
  • Find the number in an array that is closest to a given number
  • how to update a row in datatables without table redraw?
  • Javascript array declaration: new Array(), new Array(3), ['a', 'b', 'c'] create arrays that behave differently
  • Determining whether one array contains the contents of another array in JavaScript/CoffeeScript
  • Writing a functions that removes an array and adds to the list
  • Not allowing to push duplicate items into array
  • Using lodash push to an array only if value doesn't exist?
  • One Solution collect form web for “JS functional programming for n items populate”

    This solution seems like a good option:

    const n = 10;
    const items = Array.from(Array(n), x => new Item());
    

    Check more about the Array.from().


    This article gives a good level of details for functional programming in Javascript.