michalczaplinski
1/22/2018 - 11:32 AM

_.range() in pure JS

_.range() in pure JS

const array = (len) => Array(len).fill().map((e, i) => (i));
/*
 *  > console.log(array(3));
 *  > [0,1,2]
 *
 */