Which method is used to attach a listener to an event in the Events module of Node.js?

  • addListener()
  • bindEvent()
  • attachEvent()
  • on()
To attach a listener to an event in the Events module of Node.js, you typically use the on() method. It's a common and standard way to register event handlers. Options A, B, and C are not commonly used for attaching listeners in Node.js.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *