First of all I would like to apologize for the delay. It took me ~3 hours instead of 2, because I was interrupted several times, first time by unexpected call of a head hunter, just when I've started and then by my kids.
I chose TypeScript because I was a bit mistaken in the first place, for your initial google form says that we can choose any language of our choice and a second one precises that it should be Scala if possible. It was too late to change when I've started. I expected to have an exercise with a web based editor, kind of codility.com. If you ever tried their Scala editor you will understand why people choosing javascript for solving their tasks.
If you have any doubt about my ability to write Scala, you can check one of my earlier topics.