There are 5 popular methods available for fetching DOM elements -

1. Fetching the title

Screenshot 2024-08-17 at 5.39.48 PM.png

const title = document.querySelector('h1');
console.log(title.innerHTML)

2. Fetching the first TODO (Assignment)

Screenshot 2024-08-17 at 5.42.34 PM.png

const firstTodo = document.querySelector('h4');
console.log(firstTodo.innerHTML)

3. Fetching the second TODO (Assignment)

Screenshot 2024-08-17 at 5.44.15 PM.png

const secondTodo = document.querySelectorAll('h4')[1];
console.log(secondTodo.innerHTML)