JavaScript View Swapping Flashcards

1
Q

What is the event.target?

A

It’s the element that the event is being activated on.

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

It disappears off the viewport.

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

It takes a selector and returns if the element would be selected from that selector.

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

.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

Every time you create/modify a variable and have a conditional.

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

If you were to add another tab and view to your HTML, but you didn’t use event delegation, how would your JavaScript code be written instead?

A

You would remove the

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