Checkout MDN to replace boredom with learning.

02/19/2021 , 2m, 57s

Hey there so today I wrote my blog post and in the process of doing that I realized that I was doing something kind of weird. So, I have this project that's the KCD discord bot and the bot is responsible for a whole bunch of things that happen on my discord and it's awesome.

You'll meet the bot the it's the first thing that you experience when you join the discord because you can't join the discord without answering the bots questions. So I was making some changes to it and I in writing my blog anytime I write my blog. I'm always going to be writing about something that I'm working on recently or something.

I've been.Thinking about a lot recently or whatever. And so I found some code that I'd written in the bot and for a listifying an array of elements for display. So you'd say, you know, we have a thanks command so you can think a list of developers for a specific thing and we want to have the bot say thank you these list of developers for or these list of people for this thing.

So you have to have the common the right place you need to and whatever. And so I decided hey, I'll just explain how I wrote this because it was using a reduced and it was.Actually really interesting and good use case for reduced because the doing the same thing with a for loop was kind of more complicated.

And so I was writing it and then I remembered oh yeah, there's like a built-in thing and in the in toll library built into JavaScript for formatting a list. And I think I probably used that or at least explain that and then explain why I needed to write this thing myself.

And as I was writing the blog post, I realized I didn't need to write the listified function myself or at least I didn't need to write the inner workings of it. I could just wrap theList format utility that's built into the Intel API in JavaScript. And so, I I tried that out and it ended up working and so what I wanted to share with you today was that sometimes you might be doing more work than you need to because the platform already gives you a lot of really interesting things and especially the Intel API has a lot to offer that I find myself and others re-implementing like when it comes to dates and stuff like that too like formatting things for display is a lot of what the Intel API.

Allows you to do So that would be something to go give a look at it's kind of interesting and yeah, sometimes the platform is lacking in certain ways but often like this is platform that we build on is pretty capable and there are a lot of really cool things that it can do and spending some time on MDN is a good use of your time.

So next time you're stuck in a checkout line or something if you do that thing during coffee I guess but next time you're you're stuck in a line or or just waiting for something go check out FDN and look up some stuff you haven't learned before. It's aGood spot.

See ya.