Carefully read the following code:
1. var EventEmitter = require("events").EventEmitter;
2. var example = new EventEmitter();
3. example.on('data', function sample1(){});
4. example.on('data', function sample2(){});
5. console.log(???);
Which of the given options should replace ??? in line 5 of the above-given code snippet to obtain the following output? [ [Function: sample1], [Function: sample2] ]
Correct Answer: example.listeners('data')
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Node.js MCQ Questions