Learning to Slice with Negatives

A few weeks ago I was working on a kata that involved a lot of slicing. The challenge was to take an integer and format it into a string representing time. If the integer was under 3 or over 4 digits, then the function must raise an exception since it can’t be represented as a…

Filtering Out Empty Strings With Boolean

Recently, I was working on a Code Wars kata called Dubstep. The kata is about a DJ who makes dubstep remixes of songs by adding the word “WUB” around the lyrics of the song. The goal of the kata is to get back the original lyrics by creating a function called songDecoder that takes the dubstep remix string and removes…