I want to generate a random 8-digit number ranging from 0 to 7, excluding the numbers 8 and 9. Here is what I have tried so far, but I'm unable to exclude the numbers 8 and 9:
var b = Math.floor(Math.random()*90000000) + 10000000;
console.log(b)
Is there a quicker way to generate a random 8-digit number excluding certain numbers, or do I really need to generate each digit one by one and add them up until I reach 8 digits?