Transcript for Karlie Kloss, from supermodel to coding coach for girls
Reporter: From the moment supermodel Karlie Kloss wakes up, she's on. Documenting her life -- I do a sideways -- Reporter: Sharing it on her own terms. What's my best work? Here we go. I'm on my way to the global Adidas statement collection launch. Reporter: And wherever the 26-year-old Kloss goes, she takes her millions of followers along for the ride. And now when the 40-time "Vogue" cover girl isn't shooting international campaigns like for Caroline Herrera and estee lauder, or hanging with Taylor Swift and their girl squad -- We have amazing, brilliant ladies in every corner working on projects. Reporter: She's working to empower young women by doing something that might surprise you. There are a lot of aspects to what you're going to build. Reporter: She's teaching them to code. She founded "Code with klossy," a free coding camp for teenage girls in 2015 after she discovered her own love of coding. I have this audience of young women across the country, around the world. I really care about the message that I'm sending them. I thought like, you know what, I would love to offer them something more meaningful than just a picture backstage of the runway show. Reporter: Kloss got her start as a model at 13 years old. Discovered at a local charity fashion show in St. Louis where she grew up. How quickly did it go from being Normal in St. Louis to supermodel? Very quickly. When I started my freshman year of high school, I got an opportunity to walk in New York faction week for call Lin Kline. And I was 15 years old. Literally had started high school two days before. And it just put me on the map. Reporter: Since then she's become one of the most recognizable faces in the fashion world. I was going back and forth between like sitting in my chemistry class, getting on a plane that night right after school, going to Paris, walking, opening the couture show, being in the campaign, then going back home and like needing to like still turn in my five-paragraph essay. I bet you did it too, by the way. Oh, yeah. But it was this really amazing dual world and life that I lived, and still live, I guess. Reporter: When we met up with Kloss, it had been a really busy week. I got married on a Thursday, went on a honeymoon for two days, came back, and went straight into production for "Project runway." I love, kind of, my life. The thing is I really love what I do. Reporter: The couture-clad super beauty might not fit the stereotype for the hoodie-wearing coder. The daughter of a daughter, Kloss says math and science have always been in her DNA. For Karlie Kloss to talk about coding, to talk about science and technology and math, was that scary in the beginning? It definitely was scary because nobody expected me to do that. Everybody expected me to be one thing. Like to be on the catwalks or in magazines. Me standing up and kind of identifying my passions has ignited that for so many other girls. Reporter: In less than four years, they've expanded to 50 camps in 25 cities across the country. And today these campers are learning swift, the same language used by developers to create apps for apple. Last Monday, most everybody didn't have any swift experience. You learn the a to Z of how to build something and then we basically give the last two and a half days to figure out what kind of app you want to build and to build it. Reporter: Each group collaborating to solve real-world problems. "S" for sustainability. A personal project I work on for this program in school, trying to detect sinkholes before they collapse. Reporter: As young female coders, they say this camp provides a supportive place to grow and thrive. What are the coding classes in school like? Just like three girls in the front row, then the rest of it's all guys. It basically feels like a guys' club. We have this network of girls that have already done the packages, hit up a girlfriend any time I wanted to, hey, help me out here. That was really great. Reporter: Valeria started coding her sophomore year of high school. These past two Summers it's definitely a rejuvenating experience, having amazing girls to work with and talk about code with. Why all women? What is the importance of having a camp dedicated to them and coding? There's so many barriers to entry for why young women don't get into computer science. It starts with kind of having access to the education and that girls even have a coding class at their school are hesitant to take it for a number of reasons. Because they're the only girl in the class, they feel dumb asking the question in the computer science class, so they drop out. Reporter: In fact, today, while women make up more than half of college-educated workers, they make up just 25% of those in the science and technology industries. That affects the overall pipeline of women in the industry with the skills to be able to code, to be able to get an engineering job. You're going to show us some code today? Reporter: After learning some basics at camp I sat down with Kloss and her teacher avi from the flatiron school for a private lesson. Our goal, to make it rain emoji hearts. This is what the code looks like to power the emoji rain. Reporter: The code directs each heart. So we've got the function that we call movie moenlg gee. And the function is the engine that really tells what we want each emoji to do. How many lines of code was that to get this? 73. Simplified. Then there's a lot of ways to write the same thing. The more beautiful and elegant code is written, the more kind of simple it is. So that's how you make it rain. Reporter: As I spend more time with Kloss, it's hard not to notice an exuding sense of gratitude for the opportunity she's been given and what she's been able to give back. I want to use any kind of voice or power that I have to help other young women. To be a role model. I just sincerely care about helping other young women. And that's always been the case. Reporter: For "Nightline," I'm Rebecca Jarvis in New York. You can hear more of Karlie Kloss' interview on ABC's podcast "No limits with Rebecca Jarvis."
This transcript has been automatically generated and may not be 100% accurate.