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();

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What’s the name of the global object that contains everything?

A

window

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

If you have a cat object and it has a property of age how would I access it?

A

cat.age

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Is the DOM part of the JS language?

A

No, it’s part of the API (application programming interface) for the browser

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does DOM stand for?

A

Document Object Model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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];
How well did you know this?
1
Not at all
2
3
4
5
Perfectly