Javascript view swapping Flashcards

1
Q

What is the event.target?

A

The target event property returns the element that triggered the event.

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

What is the affect of setting an element to display: none?

A

essentially removes the element completely from the document. The attached element does not take up any space, even though it’s still in the source code.

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

What does the element.matches() method take as an argument and what does it return?

A

a Boolean value indicating whether an element is matched by a specific CSS selector or not.

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

How can you retrieve the value of an element’s attribute?

A

Element.getAttribute()

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

At what steps of the solution would it be helpful to log things to the console?

A

when you build a function

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