Hey guys sorry haven’t blogged in a while. So here’s me struggling at structuring my code more succinctly. This is the start of a CLI (command line interface) ToDo application, where this function addToDo() takes 2 arguments; the todo, and the day. It then uses .push to update the correct array (correct day of the week) with the todo. I had a long if/else conditional that works fine but it way too much code. I am trying to put it in a while loop in it’s place as it seems like the right tool for the job but it’s not identifying anything but the first item in the array(sunday).
The struggle is real! Have a look if you want to see me stumble around like a dummy trying to figure out what’s wrong.