let sailingjourney = {negatechallenges: function(challenges) { while(challenges.length) { let currentchallenge = challenges.pop(); if(currentchallenge === 'interpretation') { console.log('reinterpreting sailing instructions to ensure a safe journey.'); } else if(currentchallenge === 'return to square one') { console.log('sometimes returning to square one is a sacred step in mastering sailing.'); } else { console.log('overcoming ' + currentchallenge + ' with prior knowledge and a positive attitude.'); } } }, sacredsailing: function() { console.log('sailing is a sacred adventure that teaches us resilience, adaptability, and the beauty of the sea.'); } }; sailingjourney.negatechallenges(['interpretation', 'weather', 'return to square one']); sailingjourney.sacredsailing();