querySelector

PHOTO EMBED

Sat May 07 2022 11:49:33 GMT+0000 (Coordinated Universal Time)

Saved by @Luduwanda #javascriptreact

//reference classes with (".X), ids ("#X"), tages ("tagname")(like "h1") and types ("input[type='checkbox']")

const doneTodos = document.querySelectorAll(".done");
const checkbox = document.querySelector("input[type='checkbox']");

//All links in paragraphs
const links = document.querySelectorAll("p a")
content_copyCOPY