I'm teaching myself javascript and need some help with this code. can
someone tell me what's wrong with it?
function getRandomNo()
{
while (true)
{
nImgNo = Math.round(Math .random() * 10);
var strImgNo = ""+nImgNo;
if (string_of_ImgN o.indexOf(strIm gNo) = -1)
{
string_of_ImgNo = string_of_ImgNo +strImgNo;
break;
}
if (string_of_ImgN o.length > 9) break;
return nImgNo
}
}
someone tell me what's wrong with it?
function getRandomNo()
{
while (true)
{
nImgNo = Math.round(Math .random() * 10);
var strImgNo = ""+nImgNo;
if (string_of_ImgN o.indexOf(strIm gNo) = -1)
{
string_of_ImgNo = string_of_ImgNo +strImgNo;
break;
}
if (string_of_ImgN o.length > 9) break;
return nImgNo
}
}
Comment