javascript-events-2 Flashcards

1
Q

What is the difference between the getElementById() method and the querySelector() method?

A

returns the first element that matches the specified css selectors.

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

Does a callback function require a name?

A

Yes, otherwise other people reading code would be confused?

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