Interactive online courses HTML Academy
2026-03-09 12:26 Diff

We have already figured out how to clone elements. Let’s return to our main task. We are continuing to work on the to-do list. We need to add new tasks to the list by clicking on the “Add new task” button.

We already found a task template and wrote it to the newItemTemplate variable. Let’s try to clone this template and write a copy to a new variable. Output the copy to the console to make sure that the copying operation works. We will use deep cloning to save all the elements in the task structure.