A Louisiana student has beaten the odds and graduated high school at the top of his class while living in a homeless shelter.

Elijah Hogan, 19, started his high school career dealing with remote classes at the height of the coronavirus pandemic in 2020. He recently wrapped up his senior year at Walter L. Cohen High School while living in Covenant House, a homeless shelter serving youth under 22 in New Orleans.

"It's been tough and rough, had a few trips and falls down, [but] I'm alright," Hogan told "Good Morning America" of his final year in high school.

Despite the challenges Hogan has had to face, he has found a strong community at Walter L. Cohen High School and at Covenant House, which he credits for helping him succeed.

"I have people that were there to help me get through it. And without them I wouldn't have been where I'm at now as a valedictorian," Hogan said of fellow students, teachers and staff, whom he said he leaned on for support.

With a final GPA of 3.93, Hogan is one of two valedictorians in the class of 2024 at Cohen, a charter high school in New Orleans' Uptown neighborhood.

Hogan delivered a valedictorian address at the Walter L. Cohen High School graduation ceremony on May 24, a speech he described as a "thank-you note" to the community he said has given him so much.

"The speech in itself was more of a thank-you letter to the school, to the staff, to the students and to their parents for helping us to get past our school years and get us where we are now graduating, going off in the world," Hogan explained.

It's a departure from four years ago, as Hogan told "GMA," when he started high school full of nervousness.

"As time went on, I started to build up relationships, had to meet some wonderful people, got to know a lot of people, as well as forming relationships and trust with them," he said.

Among the many people who have seen and helped Hogan succeed are Jana DeCoster, director of student activities at Cohen High School, and Jarkayla Cobb, Hogan's Rites of Passage case worker at Covenant House.

"All of our students experience different levels of trauma, different experiences, and I think Elijah recognizes, like, yes, he had adults in his corner, but all of our students who made it to graduation also had adults in their corner," DeCoster said. "And it is rare that they get thanked at graduation on such a large stage … the fact that he is so gracious to think of, again, not just himself, he's thinking of all of his classmates, that's just really special."

Cobb said she has also noticed a significant change in Hogan since she first met him in 2023.

"Being in a homeless shelter is traumatic. Whatever you went through to get you here is traumatic," Cobb said.

But with Hogan, Cobb explained that he has come a long way.

"He was very shy. He had very little words at first, so it's just awesome to see how much he's developed and become so well-spoken over the last seven or eight months that I've been a part of his life and just been able to push and encourage him to go after everything that the world has to offer," Cobb said.

Now, the 19-year-old, a Marvel and Stan Lee fan who loves to read nonfiction and make art, said he is ready to take on a new adventure as he gets ready for college in the fall at Xavier University of Louisiana, where he hopes to major in graphic design.

For other students looking to follow in his footsteps, Hogan recommended they take the time to focus on schoolwork.

"There is a time and place where you can have fun, but try to keep yourself organized on some of your education as well, because without your education, you will not be able to get through the hardships and meet the people that helped you along the way," Hogan said.