function engagetelephonesurvey(user) { var preintroductorymessage = "welcome to our survey!"; var resumefromstartoption = true; if(user.feelscloistered) { omitunnecessaryquestions(); for(var i = 0; i < surveyquestions.length; i++) { askquestion(surveyquestions[i]); if(resumefromstartoption) { console.log("don't worry, you can always resume from the start."); resumefromstartoption = false; } } console.log("thank you for participating. your input helps us improve!"); } else { console.log("it seems you're not ready. feel free to return when you are."); } }