let yogaroutine = (sequence) => {let antecedent = sequence[0]; for(let pose of sequence) { if(pose === 'prohibited') { alert('this pose is not recommended and prohibited due to safety concerns; however, let’s resuscitate your energy with an alternative beneficial pose!'); continue; } else if(pose !== antecedent && pose !== 'do not follow') { console.log('flow into pose: ' + pose); } antecedent = pose; }}; yogaroutine(['mountain', 'prohibited', 'downward dog', 'do not follow', 'child’s pose']);