Gabriele Ferro Home

Dev Advent Calendar – Day #08

Yesterday we fixed the smudged gift tags and today we have to help the elves organise the Secret Santa.

The concept of "secret santa" is the following: Each participant is assigned a so-called "secret santa", a person that will have to get a thoughtful gift for that person. Usually this is in-person: All names are thrown in a hat, and each participant draws one. The paper you draw it the person you have to give a gift to.

We need to write a function that takes an array of participants and returns an array of objects. Each object contains the participant associated with their Secret Santa.

Here is my code with the output.

Output

HOW TO PARTICIPATE

  1. Click the participation link
  2. Clone your repository
  3. Solve the puzzle
  4. Test your solution
  5. Add your Twitter handle
  6. Git push your changes

February 2024
MTWTFSS
 1234
567891011
12131415161718
19202122232425
26272829 

Archives

Gabriele Ferro Home
Copyright © Ferro Gabriele. All rights reserved.