In music, cadences act as punctuation in musical phrases, and help to mark the end of phrases. Cadences are the two chords at the end of a phrase. The different cadences are as follows:
Create a function where given a chord progression as an array, return the type of cadence the phrase ends on.
findCadence(["I", "IV", "V"]) ➞ "imperfect"
findCadence(["ii", "V", "I"]) ➞ "perfect"
findCadence(["I", "IV", "I", "V", "vi"]) ➞ "interrupted"
"no cadence" if none of the criteria match up.