Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

push array into another array at random positions javascript

while (b.length) {
    a.splice(Math.floor(Math.random() * (a.length + 1)), 0, b.pop());
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #push #array #array #random #positions #javascript
ADD COMMENT
Topic
Name
7+3 =