My senior year of high school, I was in an AP Psychology class. In order to prepare for the midterm exam, I had to create over 300 flashcards by hand, which was a task that took hours upon hours of my time. Naturally, I got a headache from making so many flashcards.

Headaches are actually super common, so it's not surprising that I got one while studying. Did you know that migraines are the third most prevalent illness in the world? They're a common problem for people all across the globe, especially for students (like myself) who are trying to buckle down and study for exams. Although headaches are a frequent issue, something that most people don't realize is that there are a few tasty foods that can be really helpful in eliminating them.

Here are six foods that help with headaches that you should try snacking on next time your head starts hurting.  

1. Banana Bread

pastry, caramel, cream, cake, candy, sweet, chocolate
Ethan Cappello

Everything about banana bread is amazing, from its moist texture and mouthwatering smell to its delicious taste. Bananas have magnesium in them, an element that has been proven to be helpful in curing headaches. Basically, all you have to do is have one slice of this bad boy and you'll be ready to ace that exam (I hope). If you're not a fan of banana bread, eating a plain banana will also do the trick.

2. Watermelon

watermelon, juice, sweet, melon
Kathleen Lee

You don't need to be at a family barbecue to enjoy this delicious gift from Mother Nature. Watermelon is sweet, juicy, and full of, well, water! Eating this fruit will keep you hydrated, helping to eliminate any headaches due to dehydration. This shouldn't be too hard since watermelon is beautiful, nutritious, and basically tastes like candy. It also brings back those ~summer vibes~, am I right?

3. Coffee

mocha, milk, espresso, cappuccino, coffee
Amy Cho

Technically, this isn't a food, but who cares? It's coffee! Caffeine, the key ingredient found in coffee, has been proven to help alleviate headaches. It's not smart to drink a ton of it, but one cup of black coffee will help you through your current study sesh. Next time you find yourself in this situation, head on over to your favorite coffee shop and order a cup of your favorite brew! As a bonus, you can chill at said coffee shop and study there. Coffee shops are relaxing and have great mood lighting. It's definitely a win-win situation.

4. Avocados

vegetable, guacamole, avocado
Gabby Phi

Avocados are all the rage right now. From avocado toast to avocado sushi— it's not uncommon to see people of all ages consuming this fruit. Avocados also contain magnesium, an element that's helpful when it comes to getting rid of headaches. Plus, avocados are trendy, which means you can totally document your study snack on social media and feel no shame about it. #avocadope (I tried, okay?).

5. Cherries

juice, sweet cherry, berry, sweet, cherry
Jocelyn Hsu

Life is a bowl of cherries, especially when you need to study! Whether they're fresh from the farmer's market or baked into a tasty pie, you can't go wrong with them. Thanks to the pain-dulling quercetin in cherries, this fruit will keep you hydrated and help alleviate your headache. When your headache is gone and you get an A on your test, you will love me cherry much.

6. Pineapples

juice, pineapple, Fruit, tropical
Sam Jesner

Pineapples will help soothe your headaches by keeping you hydrated. Plus, they're super yummy. This remedy is great for those who like piña coladas and getting caught in the rain.

These are just a few foods that help with headaches. If you're not a fan of any of these eats, there are more for you to choose from. I wish I had this information last year when I was studying for psychology, so honestly, you should consider yourself blessed.