If the book actually says that you should expect the words to be printed in a certain order, then the book is straight up
wrong. Furthermore, the person who wrote the code in your example appears to have zero experience of software engineering. If that person is you, then that's to be expected. But, if your example is copied from the book, then IMO, you should get a different book. —
Solomon Slow 6 secs ago