Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript problem with for loop? Reply To: problem with for loop?

#275681
Shikkediel
Participant

I think the problem is that you are only checking for the first room if all the code is placed inside the loop. You might want to go through the entire array first and only then create a new room if it doesn’t exist yet.

Posting the code itself seems to get firewalled at the moment…

codepen.io/zJrmzr