My first question was not really clear, sorry about that. So, I know about "split" method in JavaScript and now I want to add number to random array on a position that I can choose inside array, but without "split". Question is for understanding how algorithm "inside" "split" method is working. I wrote random array, so my idea is to use loop second times for a random array, create empty array add that number to position, then number that was before the position of our new number add to empty array and then got confused a bit.
var array1 = [];
for (var k= 0, t=100; k<t; k++){
array1.push(Math.round(Math.random() * 300))
};
console.log(array1)