Under the leadership of Apple CEO Tim Cook, Apple has spearheaded an "Everyone Can Code" initiative designed to introduce coding curriculum into elementary schools, high schools, and colleges, so kids and adults of all ages can learn to code.

Apple CEO Tim Cook always speaks passionately about the importance of teaching coding to children of all ages, and last week in an interview, he even said that if you have to make a choice, it's more important to learn to code than to learn a foreign language.

Cook's recent comments spurred MacRumors reader El-ad to ask Cook about his own coding experience in an email, which Cook responded to. Cook says he learned to code in college because coding wasn't offered at the high school he attended.

El-ad, I learned in college. No classes exist in the high school I attended. I'm happy this is now changing. Tim

That Cook can code may not be immediately obvious as he ran Apple's worldwide operations before becoming CEO of the company, but it's no surprise. Before going to Duke University's Fuqua School of Business for his MBA, Cook graduated from Alabama's Auburn University with a bachelor's degree in industrial engineering, a major that requires a programming background.

In October of 2017, Cook shared additional details on his coding experience in an interview with The Sun. Back when he was attending Auburn University, Cook built a system to improve the traffic lights near the university. He aimed to optimize traffic to reduce wait times while maintaining the safety of the lights. His work was a success and it was implemented by the local police force.

"That was pretty cool at the time - and it worked, Cook said. "Law enforcement implemented it."

Apple's Everyone Can Code curriculum is available in schools and colleges around the world, with many colleges offering Apple's App Development with Swift Curriculum. That course is a full-year coding course designed by Apple engineers and educators and it is designed to teach students how to code and design apps for the App Store.

For younger learners, Apple offers Get Started With Code and Swift Playgrounds curriculum, and for those who want to learn outside of a classroom, Apple offers the Swift Playgrounds app on the iPad.