1.

Which is the method used to add an event listener?(a) addEventListener()(b) addListener()(c) addEvent(Listener)(d) addListener(Event)I have been asked this question in exam.My question comes from Lazy Loading topic in division Invocation and Performance Navigation of JavaScript

Answer»

Right ANSWER is (a) ADDEVENTLISTENER()

The explanation: The addEventListener() method attaches an event handler to the specified element. The addEventListener() method is used to ADD an event LISTENER to the script.



Discussion

No Comment Found

Related InterviewSolutions