The Student Room Group

Does anyone know what to do here?

I have been stuck for a few weeks on this can anyone help
var rooms = [bridge,lab,canteen,cabin,storage]

initiate();

function lifeSupportCheck() {
for (i=0;i<rooms.length;i++) {

}
}

lifeSupportCheck();

Reply 1

Original post
by Zechomik
I have been stuck for a few weeks on this can anyone help
var rooms = [bridge,lab,canteen,cabin,storage]
initiate();
function lifeSupportCheck() {
for (i=0;i<rooms.length;i++) {
}
}
lifeSupportCheck();

Hi, what are you trying to do here? :smile:

Reply 2

Looks like you just need to put something inside that loop. Right now it’s running through each room but not actually checking anything. For example, you could just console.log(rooms) inside the loop to make sure it’s working, then later replace that with whatever check you want for life support.

Quick Reply

How The Student Room is moderated

To keep The Student Room safe for everyone, we moderate posts that are added to the site.