diff --git a/excercises.html b/excercises.html new file mode 100644 index 0000000..3d3f632 --- /dev/null +++ b/excercises.html @@ -0,0 +1,189 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/index.html b/index.html index 98ed260..da6ef66 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,7 @@ To-Do List + diff --git a/scripts/styles.css b/scripts/styles.css new file mode 100644 index 0000000..e69de29 diff --git a/scripts/todolist.js b/scripts/todolist.js index f5f7b75..455ecd7 100644 --- a/scripts/todolist.js +++ b/scripts/todolist.js @@ -1,4 +1,7 @@ let tasks = []; +let myName = "mytext"; +let myAge = 20; +let isWorking = true; function addTask() { const taskInput = document.getElementById('taskInput'); @@ -6,6 +9,7 @@ function addTask() { if (task !== '') { tasks.push( task ); + taskInput.value = ''; renderTasks(); } } @@ -17,10 +21,15 @@ function renderTasks() { tasks.forEach((task, index) => { const listItem = document.createElement('li'); listItem.className = 'list-group-item d-flex align-items-center'; + + listItem.innerHTML = ` - ${task} +
  • + + ${task} +
  • `; taskList.appendChild(listItem);