#1
let getSimpleNumbers = ( ( ) => {
function isSimple(num) {
let delimiter = Math.floor(num / 2);
while (delimiter > 1) {
if (num % delimiter-- === 0) return false;
}
return true;
}
return (from, to) => {
let x, result = [ ];
for (x = from; x <= to; x++) {
if ( isSimple(x) ) result.push(x);
}
return result
}
} ) ( )
alert( getSimpleNumbers(132, 723) )