As the CEO of the world's most valuable company (Apple currently boasts a market value of nearly $870 billion), Tim Cook is more than qualified to offer life advice. But what advice would Cook give to his younger self?

"I would tell myself that the joy is in the journey," Cook says, according to an excerpt of an interview with MSNBC's Chris Hayes and Recode's Kara Swisher that is set to air Friday, April 6.

"The truth is we all have the same purpose. And, we should all quit looking," Cook told the crowd at Chicago's Lane Technical College Prep High School.

"Our purpose is to serve humanity."

He says it's something he learned from his late boss, Steve Jobs.

"I went through a period of time that I was rudderless, where I thought I should be looking for my purpose," he said. "I looked under every sheet, behind every door, and everywhere, and I couldn't find it. I thought, 'Oh my God, there's something wrong with me. I can't find it.'"

Cook says he finally came around after he met Steve Jobs and joined Apple in 1998, noting that he'd "found a company that believed ... its job was to serve humanity."

During the interview, Cook went on to advise high school students to ask the question, "What will be my gift?" every day.

"Most of your gifts will never be money," he said. "They will be a gift of yourself and your passion — your way of changing the world, improving the world for other people."