Skip to content
Advertisement

Why I get duplicated todos in todo list?

This is the js code

JavaScript

When I add a todo for the first time its ok, but the seconed time will print the first todo again include the seconed.

example:

  1. first todo 2.first todo 3.seconed todo

Advertisement

Answer

You should make another function to handle single todo added, below is your updated code

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement