Interactive web pages with JS Flashcards
(6 cards)
1
Q
If you have a cat object and it has a method of meow() how would I call it?
A
cat.meow();
2
Q
What’s the name of the global object that contains everything?
A
window
3
Q
If you have a cat object and it has a property of age how would I access it?
A
cat.age
4
Q
Is the DOM part of the JS language?
A
No, it’s part of the API (application programming interface) for the browser
5
Q
What does DOM stand for?
A
Document Object Model
6
Q
Select the H1 tag with the id of full_name and assign it to the variable fullName
A
var fullName = document.getElementById("full_name"); var lastName = document.getElementsByTagName("span")[1];