DEV Community

Discussion on: A basis for a coding interview using "FizzBuzz" only⁉- 8 challenges for beginners AND Pros [with a twist for Pros! 😱]

Collapse
 
siddharthshyniben profile image
Siddharth • Edited

You can consider it done! After a lot of testing and stuff, it seems bug free. Test it out and tell me if there's any problems.

About my attempt

Challenge 1: Was not very hard, just had to reimplement division, which was pretty easy
Challenge 2: Still pretty easy. Just had to add some event listeners. This was made even more easy by the fact that my fizzbuzz function only checked a single number.
Challenge 3: Just had to add a few lines
Challenge 4: This was easy at first, but would ultimately be the biggest problem and I had to rewrite it.
Challenge 5: That was literally what I was doing. I was just logging to the console outside my fizzbuzz function. Just needed to change a few lines.
Challenge 6: Easy again, because my fizzbuzz function just checked one number, and I just had to change the numbers in the recursion I was doing earlier
Challenge 7: Easy, but this was where I made 99% of my silly mistakes (I was trying to reverse recursion, until I realized I need to pass in the minimum). This part took the most time.
Challenge 8: This was pretty easy, because I'm used to manipulating objects in this manner.

What I learned:

  • Open/Closed principle is awesome!
  • Recursion is not as easy as I thought (but still pretty easy)
  • I make billions of silly mistakes (why didn't that variable change? of course i didn't assign any value to it)

PS: These challenges are awesome, would love it if you make more! I might even make a challenge myself! (I did once but no one answered. I guess it was too hard)