Math is undefined

function getRandomNum(min, max){
   return Math.floor(math.random() * (max - min + 1) + min)

var randnum;

randnum = getRandomNum(1, 6);

I defined it using randnum but doesn’t work.

Inside of the function you have one use of Math and one use of math. They both need to be Math instead.

thank you

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.