Just a quick question: Can I call the same function within a function?
function rIN() {
randomImgNumber = (Math.round(imgNumber * Math.random())) - 1;
if (randomImgNumber === "undefined") {
rIN();
}
return imgArray[randomImgNumber];
}
If not, is there another way I can redo the same function inside a function?
I'm sorry if this is a bad question, I am a beginner in coding.