Skip to content

The monthly coding challenge for IT students in Switzerland

The ti&m Coding Challenge starts in March 2024, exclusively for students in Switzerland. From March to July, a new exciting task awaits you every month: from number searches to a graph challenge with Dijkstra to a CSS, HTML Quest. Use your skills, solve the puzzles and win cool prizes every month. And that’s not all – there’s a super grand prize at the end!

Take part now!

How it works

To take part in the challenge, you simply have to solve the new coding challenge on our website every month. The tasks will be published at the beginning of the month; you have until the end of the month to submit your solutions.

Discover the monthly challenge

Unleash your problem solving skills

Submit your answer via our form below

With a bit of luck, you can win cool prizes

#2 Challenge: JavaScript quiz

Time required: Approx. 15-25 minutes

Our second challenge is now online. JavaScript is one of the World Wide Web’s key technologies. More than 97% of all websites use it. So it would be fair to say that it’s pretty important. We’ve had fun finding three interesting or tricky functions for you to decipher. And again, each one is a little more difficult than the last. To make it that bit more difficult, you not only have to calculate the answer, but also justify it. Choose the correct answer from our selection list and explain why this function provides exactly this answer.

With a bit of luck, you could win a Jabra Elite 10 headset!

Question 1: Confusing arrays

Let’s start with quite an easy one. This is a basic function of JavaScript – why does the console give this answer?

A) The function specifies that all numbers that can be divided by 3 are filtered out, then the remaining numbers are multiplied by 2 and then added together. (1*2 + 2*2 + 4*2 + 5*2 = 24)

B) The function never reassigns the input after the “for each”, which means that we simply add up all the numbers at the end.

C) The filter changes the array directly, but “for each” only returns a changed array and does not change the values of the original array. At the end, only the filter part is applied to the array, which then adds 1+2+4+5 = 12.

Question 2: Destructuring objects

Okay, now let’s make it a little more difficult and see if you can decipher the structure of this function. We have three objects (in this case, employees), all of which are a certain age. Perform the function and choose the correct explanation for your answer.

A) The ages of Tobias, Timon and Tom are simply added together.

B) A set does not allow duplicates, i.e. Tobias and Timon are only counted once.

C) Since we are using a set, all duplicates are removed. As we are using objects, only the entries that have exactly the same references are removed. This means that Timon can be inserted into the array twice, as there are two different references.

Question 3: Fun with dates

Okay, now it’s getting more difficult. Here we have a function that looks quite simple at first glance, right? Simply enter the day, month and year. But the answer is somewhat different. Why is that?

A) This is a relative function. We are in the year 2024, 19 years after ti&m was founded. The function therefore divides the founding date by the number of years the company has been in business, thus indicating the founding date relative to the number of financial years.

B) getYear is an obsolete function that only returns the difference between the year 1900 and the date. getMonth returns the index of the month, but starts with 0. getDay returns the day of the week.

C) We create the date object incorrectly, which leads to an incorrect date output at the end. The correct way to create a date is: new Date(February 1, 2005 00:00:00')

Take part in the competition now

Take part and win great prizes! The competition is open to students in Switzerland. The winners will be drawn from the correct answers at the end of each month. By the way, here are the conditions of participation.

Submit your solution
Jennifer Harstad

Employer Branding

Jennifer Harstad

Contact us directly if you have any questions.