Question: If EventEmitter is in scope, which of the following lines of code will have an event emitter emitting a change event?

  1. EventEmitter.emit('change');
  2. EventEmitter.new().emit('change');
  3. (new EventEmitter()).emit('change');
  4. new EventEmitter('change');

Answer: The correct answer of the above question is Option A:EventEmitter.emit('change');