Javascript and the DOM Flashcards

1
Q

When the browser loads a web page, it creates what 2 objects?

A

Window and document

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

Window

A

gives you access to information about the current browser window, including it’s document, location, and the global scope

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

Document (Object Model)

A

an API that gives you access to all HTML nodes

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

clear()

A

clears the DOM screen

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

What are the correct ways to access the document?

A
  • window.document
  • document
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The _____ object contains everything, it’s the global object.

A

window

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

If you have a cat object and it has a method of meow() how would you call it?

A

cat.meow()

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

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

A

cat.age

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

API

A
  • Application Programming Interface
  • a set ofroutines, protocols, and tools for building software applications
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are 3 types of actions we can do to the DOM?

A
  • Manipulation
    • where we manipulate elements
  • Events
    • listening to a specific event, like a mouse click or a key press, and have something execute
  • Traversal
    • selecting an element based on the relationship with another element
    • for example. we could select a chiled element of a known parent element like a list item child of an unordered list
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

4 P’s of Problem Solving

A
  • Prepare
  • Plan
  • Perform
  • Perfect
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

The DOM stands for: _____

A

Document Object Model

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

Is the DOM part of the JavaScript language?

A

No, the DOM is an API for the browser

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

What browser tool lets you experiment with JavaScript code by writing a single line at a time?

A

JavaScript Console

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