From ‘Never’ to ‘Any: My TypeScript Journey

05 Sep 2024

Screenshot 2024-09-01 at 5 50 39 PM

The first destination on my typescript journey was going to FreeCodeCamp and complete their JavaScript and ES6 tutorials. I had a smile on my face and was equipped with a foolhardy confidence in my ability to complete these exercises promptly. I believed I could breeze through these exercises and be familiar with JavaScript within an hour or two. Things did not go to plan.

When I had finally completed all 142 exercises, 6 hours had passed. It was 2:30 am, and the only thing keeping me awake was the minute progress I’d see in the percentage bar after I completed yet another exercise. Just another 10 percent, I told myself to muster up the motivation to keep going. Those final questions were by far the most difficult, not because of their content but because I had so many new ideas being introduced; everything was getting mixed up. It felt like I was wading through a dense fog of new concepts and tangled syntax. When I finally saw the light (the 100% completion notification), I went to bed and dreamt sweet dreams of JavaScript. 

I had finally built up my foundations and had my sights set on learning TypeScript. I was like Ishmael bracing for Moby Dick, ready to tackle the vast waters of TypeScript. I was armed with my JavaScript experience and felt prepared to take on the beast. My first steps began with W3 School’s TypeScript Tutorial, which familiarized me with the basics of TypeScript. W3’s tutorial broke down TypeScript’s complexity into concise sections and provided me with short problems to test whether I’d learned that section or not. It didn’t take long for me to become somewhat familiar with TypeScript’s syntax and requirements. After reading and reviewing the TypeScript content, it was time for me to more formally test what I had learned. W3 has a more comprehensive set of questions to see how well you know TypeScript. I completed the test and received a score of 92%; I was elated. I retook the test after reviewing the answers and received a 100%!

With my review complete, it was time to put my TypeScript knowledge to the test. The first coding challenge I attempted with TypeScript was to “Find the sum of all the multiples of 3 or 5 below 1000.”. I knew what I had to do, but as I wrote my code, it began to look more and more like a Christmas tree; red lines adorned the pages underneath my variable names, my return values, and in my for-loop. I had to look back to W3 to see what I had done wrong. With time, each red line disappeared as I learned more. The errors were gone, and I tested my code. It worked! As I submitted my code, after persevering through the confusion and thoroughly testing my code, I felt confident in my ability to use TypeScript, even though this is most likely only the start of my journey.