Now it seems to work the way I wanted.
I just have some questions so I learn more. Se comments in the code.
the code "!isCorrect" means that the isCorrect is false?
////this code removes one number from the Array?
var newNum = Nummer.splice(random(Nummer.length), 1);
///// if isCorrect is false the number of the frame is pushed back into the Array?
if (!isCorrect && currNum != undefined) {
Nummer.push(currNum);
}
currNum = newNum;
return newNum;
}
How does the code know which frame I am so it knows which to remove?




Reply With Quote