I need help! I want to use a for loop over an array so that it can look for titles, I have a simple ADD TODO form input and I have made it submit and push the todos or titles of the todos,
todos.push({ title: req.body.add_todo_input, complete: false });
I use this line to push the the users input / the todos to the array, I then use EJS to show the result on the webpage <%= todos.title %>, I decided why not make a for loop that loops over the array so that I can add some conditional if statements that check to see if any of the titles inside the array are equal to the same input, and if so don't push the todos and console log this message (" Error: TODO already exists ").