You're exactly right. Friends got around 20million viewers for each episode and earned over $5 billion in worldwide revenue, being in the top ten most watched shows of the year for the entirity of its run, and still makes a healthy amount in reruns today. Obviously this was also down to writers, producers etc. but you…