Added: var magicNumber

Math.floor(Math.random() * (10 - 1) + 1);