I wan to generate a random even number between min and max using this function. what do i need to change in this function : I have this function which gives me a random number between mi and max excluding the numbers in notthis. How do I change it to give me a number that is an even number.        

<!-- begin snippet: js hide: false -->

<!-- language: lang-js -->

    function getrandomnumber(min,max,notthis)
    {
    var num=min+Math.floor((max-min+1)*Math.random());
    var j=notthis.indexOf(num)

    while (j!=-1)
    {
    num=min+Math.floor((max-min+1)*Math.random());
    j=notthis.indexOf(num)
    }
    return num;
    }

    a=getrandomnumber(0,100,"0,10,20")
    document.write(a)


<!-- end snippet -->

