I am trying to generate three Random DIFFERENT Numbers at once. But it is not generating them properly. Please help me to solve this.
Following is my code
function makeRand(){
        var numLow = 1,
        numHigh = 7,        
        adjustedHigh = (parseFloat(7) - parseFloat(1)) + 1,        
        numRand = Math.floor(Math.random()*adjustedHigh) + parseFloat(numLow);
        console.log("In makeRand "+numRand);
        chkGen(numRand);
    }
    function chkGen(prev){
        console.log("In chkGen "+prev);
        if(latest===prev){makeRand();}
        old=prev;
        latest=prev;
        console.log("Old is Now "+old);
        return prev;
    }
$(document).ready(function(){
   window.old=0;
   window.latest=0; 
   for(i=0;i<3;i++){
    console.log("Started Here "+old);
    var rnd=chkGen(old);
    imgNo[i] = rnd;
    }
   alert(imgNo);
});
 
     
     
     
    