DEV Community

Cover image for My first advent code challenge with #JavaScriptmas !
Maeling (she/her)
Maeling (she/her)

Posted on • Edited on

My first advent code challenge with #JavaScriptmas !

In January of this year, I decided to learn how to program after dabbling in HTML and CSS for several years. Since I was curious about the basics of computer science, I began my journey with the popular and often recommended CS50 Introduction to Computer Science course offered by Harvard.

Ever since I started my journey of learning how to program, I've been amazed by the amount of learning resources that are available, and many for free! This actually became a bit distracting for me at one point, when I found myself doing CS50, freeCodeCamp and The Odin Project all at the same time 😖.

After receiving some great advice, I realized that I needed to focus on one curriculum at a time to be able to really dive deep and gain a greater understanding of the concepts. I zoned in on CS50 and was in the middle of Week 8 (Web Track) of the course when I saw a tweet about #JavaScriptmas, a 24-day JavaScript coding challenge being offered by Scrimba. Since JavaScript had just been introduced to us in week 8's lesson in CS50, I decided that the challenge would be a great companion for my course material. Plus, it just looked like it would be so much fun coding small challenges along with fellow coders all over the world!

24 Days of #JavaScriptmas

I received a #JavaScriptmas challenge from Scrimba everyday from December 1st through the 24th that was JavaScript-based and sometimes included a mix of HTML and CSS. I really enjoyed Scrimba's unique and interactive code screencasts (aka "scrims") that introduced the challenge for each day. It was great to have them explain the challenge for the day and then have the ability to jump straight into the code editor within the same screen.

Because CS50 primarily focuses on C and Python as far as programming languages, I wondered if I would be able to complete any of the challenges. However, as I started to work through the challenges each day, I was encouraged to see that I could solve them using the programming logic I had learned from studying the other languages. It really became a matter of understanding and integrating syntax differences and the many methods that were available to use with JavaScript.

My #JavaScriptmas Solutions

You're more than welcome to browse some of my solutions via my "scrims" below. Some of my favorite challenges were the ones that involved HTML and CSS (*), since it taught me a lot about interacting with the Document Object Model (DOM). I know I'll be able to improve on my solutions as I learn more about JavaScript, but you have to start somewhere and I'm grateful to have completed all 24 days of this year's challenge!

Day 1: Candies
Day 2: Deposit-Profit
Day 3: Chunky Monkey
Day 4: Century From Year
Day 5: Reverse a String
Day 6: Sort by Length
Day 7: Count Vowel Consonant
Day 8*: The Rolling Dice (my first time ever "drawing" with CSS)
Day 9: Sum Odd Fibonacci Numbers
Day 10: Adjacent Elements Product
Day 11: Avoid Obstacles
Day 12: Valid Time
Day 13: Extract Each Kth
Day 14: Maximal Adjacent Difference
Day 15*: Carousel (an image slider - definitely my favorite challenge!)
Day 16: Insert Dashes
Day 17: Different Symbols Naive
Day 18: Array Previous Less
Day 19: Alphabet Subsequence
Day 20: Domain Type
Day 21: Sum of Two
Day 22: Extract Matrix Column
Day 23*: Social Media Input
Day 24*: Test Your Agility (this one is actually fun to play!)

Have you ever participated in a code challenge before? What are some of your favorites?

Top comments (2)

Collapse
 
pistus profile image
Frode Jensen

Great stuff - and well done applying the general programming logic to javascript when needed! A very handy skill to have and it shows you have learned the principles rather than the syntax. Fun fact: For bulding Scrimba we actually use our own programming language called imba:)

Collapse
 
maelingcodes profile image
Maeling (she/her)

Thank you Frode! That's so funny you mention the fact about Imba because I JUST learned that today from reading the comment section on an old article by Per on Indie Hackers! Can't wait to learn more about it and experiment with it down the road.