SO-34074505

by David Thomas

JavaScript

var arr = new Array(20);

arr.fill('').forEach(function(needle, i, haystack){
  haystack[i] = Math.floor(Math.random() * (300 - 1) + 1);
});

console.log( arr )