var mountainclimbingexperience = new adventure(); while(mountainclimbingexperience.preliminarycheck() == "ready" && mountainclimbingexperience.difficulty != "hard") { mountainclimbingexperience.climb("shrouded peak"); if(mountainclimbingexperience.alertreceived()) { console.writeline("alert: slight weather change detected. stay safe."); } else { mountainclimbingexperience.progressreport(); } if(mountainclimbingexperience.shouldreturntobeginning()) { mountainclimbingexperience.resetclimb(); console.writeline("returning to the beginning for another attempt."); } }