Decimal in answer


I get a decimal instead of an whole number is that right?

var rock;
var paper; 
var scissors;
var userChoice = prompt (" Please choose rock, paper or scissors");
var computerChoice = Math.random(0,1);


if we check the docs, its says:

Getting a random number between 0 and 1, inclusive

so yea, numbers between 0 and 1 are very likely decimal numbers.


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