var arr = [], arr2 =[]; for(var i = 0; i<50; i++) { arr.push(Math.floor(Math.random() * 50)); arr2.push(Math.floor(Math.random() * 50)); } console.log(arr,arr2);