var skydiveexperience = new skydivesimulation(); skydiveexperience.prepatoryprocess(() => { while(!skydiveexperience.ready) { skydiveexperience.packparachute(); } if(skydiveexperience.feelsnervous) { skydiveexperience.encourage("never let anyone deride your courage, skydiving is about overcoming fears."); } skydiveexperience.jumpwithinstructor((result) => { if(result.needsassistance) { skydiveexperience.resuscitate(); } else { skydiveexperience.landsafely("share your skydiving story, even the under-the-table adventures that made you smile."); } }); });