ton.parentElement.parentElement;
        let $todoTitle = $todo.querySelector('.todo__title');
        let $todoInput = $todo.querySelector('.todo__input');

        if ($todoTitle) {
          $todoInput = document.createElement('input');
          $todoInput.classList.add('input', 'todo__input');
          $todoInput.value = $todoTitle.textContent;

          $todo.removeChild($todoTitle);
          $todo.prepend($todoInput);
        } else {
          $todoTitle = document.createElement('span