It happened about a year ago. I stepped off the subway and spotted an ad on the station wall for a food delivery service. It read: “When you want a whole cake to yourself because you’re turning 30, which is basically 50, which is basically dead.”

After a bunch of us squawked about the ad on social media, the company apologized for what it called attempted humor and what I’d call ageism.

Maybe you recall another media campaign last fall intended to encourage young people’s participation in the midterm elections. In pursuit of this laudable goal, marketers invoked every negative stereotype of old people — selfish, addled, unconcerned about the future — to scare their juniors into voting.

Adweek called it “comically savage.” I’d drop the “comically.”

And such jabs constitute mere microaggressions compared to the forms ageism often takes: pervasive employment discrimination, biased health care, media caricatures or invisibility. When internalized by older adults themselves, ageist views can lead to poorer mental and physical health.