DEV Community

Cover image for It's the first day of Scrimba's #JavaScriptmas Advent Calendar! 🎄 Let's take a look at challenge number 1. 🎅🏻
Per for Scrimba

Posted on

It's the first day of Scrimba's #JavaScriptmas Advent Calendar! 🎄 Let's take a look at challenge number 1. 🎅🏻

If you haven't already heard, Scrimba has launched 24 Days of #JavaScriptmas - an "advent calendar" of code challenges which gives you the chance to put your coding skills to the test and win prizes every day until Christmas Eve!

The #JavaScriptmas challenges have been created by Scrimba's popular teacher, Dylan 'Claus' Israel. You might know Dylan from his YouTube channel CodingTutorials360, but what you probably didn't know is that he moves to the North Pole every December and takes on a completely different job...creating advent calendars for code enthusiasts like you! 🎅🏻

The #JavaScriptmas calendar contains challenges of increasing difficulty, so if you take part, you'll give yourself a good chance of becoming a Javascript maestro in time for Christmas!

Time for the challenge!

Now let's take a look at the very first coding conundrum, a task all about dividing candies equally, which could come in handy over the holidays!

description of candies challenge
Click the image to access the challenge.

Some skeleton code is provided in the screencast, so it's super easy to get started:

function candies(children, candy) {
    //  write code here.
}
Enter fullscreen mode Exit fullscreen mode

As it's the season for giving, Dylan also spoils us with a handy hint to help us along the way, and that is to consider using Math.floor(). However, this is a recommendation and not a requirement. If you come up with a different solution, by all means share it with the community.

Speaking of sharing with the community, that's exactly what you should do if you'd like to be in with a chance of bagging one of the daily prizes. Simply share your solution on Twitter with the #JavaScriptmas hashtag and you'll automatically be entered into Scrimba's prize draw. Better still, Scrimba has installed a 'Share Your Solution' button into every challenge to take the leg-work out of Tweet-writing.

If you haven't signed up to the advent calendar yet, it's not too late! Head over to the 24 Days of #JavaScriptmas page and hit enrol - you'll then receive each day's challenge directly to your email inbox every day until Christmas Eve!

Merry challenging! 🎄

Top comments (0)