From 6ba00d6c3d82b3bf585a9cc954b78183f6946a39 Mon Sep 17 00:00:00 2001 From: Benjamin Ayala Date: Wed, 18 Jun 2025 14:34:43 -0400 Subject: [PATCH] =?UTF-8?q?Completed=20Tasks=201=E2=80=933=20for=20DOM=20a?= =?UTF-8?q?ssignment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/script.js b/script.js index 5762129..04e3cbc 100644 --- a/script.js +++ b/script.js @@ -18,3 +18,14 @@ console.log("Hello! If you see this, the script is working."); // Try rewriting this without using querySelector const header = document.querySelector("#container"); console.log("header", header); +//1: Select the section with an id of container without using querySelector. +const container1 = document.getElementById("container"); +console.log("Task 1:", container1); + +// 2: Select the section with an id of container using querySelector. +const container2 = document.querySelector("#container"); +console.log("Task 2:", container2); + +// 3: Select all of the list items with a class of "second". +const seconds = document.getElementsByClassName("second"); +console.log("Task 3:", seconds);