javascript add number to random array

末鹿安然 提交于 2019-12-20 06:29:55

问题


I need to add any number to random array to the preset position and and move elements after him. I just wrote code for random array how to continue?

var CreateArray = (...lengths) => lengths.map(length => (
  Array.from({
    length
  }, () => Math.floor(Math.random() * 3000000))
));
var randomarrays = (arrs) => {
  arrs.forEach(arr => {
    randomarray(arr);

  });
};

来源:https://stackoverflow.com/questions/50973346/javascript-add-number-to-random-array

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!