Question 1
Suppose you are given the below HTML.
Which of the following code(s) can be used to access the HTML paragraph element at “Statement 1” using JavaScript?
document.getElementById(“id2”)
document.getElementById(“id1”)
document.getElementByClassName(“class1”)
document.getElementByClassName(“class1”)[0]