Javascript-events-1 Flashcards

1
Q

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

A

get is only for id’s, selector isfor anything

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

Who passes in the event object into the handleClick callback function?

A

Javascript, the event, like “click”.

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

Does a callback function require a name?

A

no, anonymous (anonymous is rare)

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