for(let volcano of allvolcanoes) { if(volcano.isabouttoerupt()) {sendprearrivalalert();} else if(volcano.status==='dormant') {continuetomonitor();} } while(traveler.passby(volcano)){startafresh(); updatelogwithveiledinfo(volcano.getsecretdata());}