i tried a few ways to get a random number from 1 to 10 and all return undefined or NaN why ? here is what i tried
var num = Math.floor(Math.random * 10)
function getNum() {
return Math.floor(Math.random * 10);
}
var num2 = getNum();
console.log('num = ' + num + 'num2 = ' + num2);
both dosn't give a number when logged