DEV Community

Cover image for #100DaysofCode days 1-7 to-do list
Kim
Kim

Posted on

#100DaysofCode days 1-7 to-do list

I spent the first few days working on the html and css, and the last few days have been spent on javaScript. I'm going through an HTML and CSS course on Udemy right now, so a lot of that was still fresh in my mind. It's been MONTHS since I learned javaScript. Here are the things I accomplished this week...

Got the "checkmark" and "remove" buttons working on the hardcoded elements.

Set up the "completed" section to automatically remove elements after a certain number.

Set up the "plus" button to add elements to the to-do list
What I'm really stuck on is this...

Getting the "checkmark" and "remove" buttons to work on elements added with the "plus" button

I made some improvement with this today. I made an array to hold the elements instead of using the node list(which I was previously using). I read that the node list is read only and I needed to add elements.

At first, I couldn't get the array to update with adding elements to it, but I did get that working today. Now for the weird part... if I add two elements to the list, I can remove the first item I added with the "remove" button. That is the only "remove" button that works.

Now I'm taking a little break from it. I spent the rest of my hour today working on the CSS on this blog. I felt that it was a better use of time, otherwise, I might have just stared blankly at code for the rest of the hour.

This is just a roadblock, and I know I'll get past it. I am planning on creating a simpler to-do list using just text elements and see if I can get that to work. The code on this to-do list is getting complicated and it's hard for me to see the bigger picture, which is exactly what I need to do.

I hope everyone doing this challenge is having fun working on their projects! Drop a line below and share what you're working on :)

Oldest comments (0)