Question
1. How can we grab all of the h2 elements from a webpage? a- document.getElementsByClassName(h2) b- document.getElementsByTagName(h2) c- document.querySelector( ) d- document.getElementsByTagName( ) e- document.querySelector(h2)
1. How can we grab all of the h2 elements from a webpage?
a- document.getElementsByClassName("h2")
b- document.getElementsByTagName("h2")
c- document.querySelector("
")
d- document.getElementsByTagName("
")
e- document.querySelector("h2")
2. When using "for...in" to iterate through the properties in an object, what value(s) are passed into the block in each iteration?
a-the value
b- the key
c-both key and value
3.Which of the following is the best choice for declaring a counter variable (e.g., to use in a loop)?
a- const
b- var
c- let
4. What is the correct way to link a CSS file to HTML?
a-
b.
c.
d.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started