function pickNum(len) {
    var nums = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    for (var i = nums.length - 1; i > 0; i--) {
        var j = Math.floor(Math.random() * (i + 1));
        var temp = nums[i];
        nums[i] = nums[j];
        nums[j] = temp;
    }
    console.log(nums);
    return nums.slice(0, len);
}
/* Picks a random 4 digits number with no duplicates.
 * ------------------------------------------------------------------------- */
Picks a random 4 digits number with no duplicates.
Picks a random 4 digits number with no duplicates .
function pickNum(len) {
    var nums = [1, 2, 3, 4, 5, 6, 7, 8, 9];
    for (var i = nums.length - 1; i > 0; i--) {
        var j = Math.floor(Math.random() * (i + 1));
        var temp = nums[i];
        nums[i] = nums[j];
        nums[j] = temp;
    }
    console.log(nums);
    return nums.slice(0, len);
}
function pickNum ( len ) { var nums = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ] ; for ( var i = nums . length - 1 ; i > 0 ; i -- ) { var j = Math . floor ( Math . random ( ) * ( i + 1 ) ) ; var temp = nums [ i ] ; nums [ i ] = nums [ j ] ; nums [ j ] = temp ; } console . log ( nums ) ; return nums . slice ( 0 , len ) ; }
Picks a random 4 digits number with no duplicates.
Picks a random 4 digits number with no duplicates .