I came across some code in Angular that rotates between words every few seconds:
words: string[] = [\'foo\', \'bar\', \'baz\']; word = null; rotateWords() {