javascript add number to random array
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