skip navigation
skip mega-menu

DWP Digital JavaScript Coding Challenge: ‘JavaScript is Weird’

This event has now ended.
16 September 2021 11:00 - 11:30

Put your digital skills to the test with three mini coding challenges!

Join DWP Digital in this fun coding challenge for National Coding Week brought to you by one of our very own software developers Adam McKenna.

What’s the challenge?

Our challenge ‘JavaScript is Weird’ will test your skills through three mini-challenges that will highlight some of the peculiarities within JavaScript.

To view the final solutions, join us on Thursday 16th September at 1pm for a 30-minute session, where our Adam will guide you through solving the different challenges.

You can find the full challenges below. Time to get coding! Good luck.

For more information on DWP Digital:

Visit our DWP Digital Careers site today.

To keep up to date with us on the latest roles subscribe to the DWP Digital newsletter.

Do you love social media? Follow us on Twitter, LinkedIn and Instagram @DWPDigital.


Challenge 1:

// Using only the characters 'a' and 'b', print 'banana' to the console.

// You can use any JavaScript methods.

// Hint: you will need `toLowerCase()`.

Challenge 2A:

// What is the result of the following operation:

// ["str1", "str2"] + [0,1,2]

Challenge 2B:

// How can you concatenate these arrays?

Challenge 3A:

// What is the value of x in the following operation:

// let x = [] == ![];

// x ||= 7;

Challenge 3B:

// By only adjusting the second line of code from the following block,

// and without explicitly assigning `x` a value,

// how can you make this code output 7?

16 September 2021 11:00 - 11:30

Related Events

Subscribe to our newsletter

Sign up here