5 Replies
is there any way to make this loop ?
if i want to add any question i need to put antother if !
is there any way to make loop for
im making a exam question app
and for each question im making a array
so u mean i just put all the question in 1 other array ?
yeah
though I'd also not use an array for the questions, much better to use an object:
it also looks like your function is modifying the global scope directly, which isn't a good idea. You've got something like
let question_peeker;
somewhere, and you're setting its value in the function? It's generally a good idea to have functions only ever modify their own scope, and return things if you need data out of them:
also, that function does not return a random number, so you should probably rename it to something more appropriate. Naming is hard, but also super importanttnx for help i am fixing the problem u say