Question: [![enter image description here](https://i.stack.imgur.com/B6KHS.png)](https://i.stack.imgur.com/B6KHS.png)

How can I get cell A3 to reflect the the highest value in terms of the bigger numerical number of cloumn A be it a positive or negative value?

Answer: 
So this is how I use in my testing. I use it with Class semantics

One caveat to note that is, it is always required to register a listener before an event is emitted, because when an event is emitted, it looks for already registered set of listeners and then emits the flow over there.

```
//emitter.js
// The core module events has EventEmitter class which we are going to make use of
// note that we are not going to use that explicitly but by means of another class

const EventEmitter = require('events');

Class EventEmitterClass extends EventEmitter{
    emitterMethod(){
      this.emit('testEventEmitted', {obj:'testString object'});
    }
}

module.exports = EventEmitterClass; // we export the module with the objectInstance

//listener.js
// now import the emitter.js and we get back a class - EventEmitterClass
const EventEmitterClass = require('./emitter.js');//give the actual path of js
const eventEmitterObj = new EventEmitterClass();

//now it is mandatory to register the listener before we even think of calling the //emitter method
eventEmitterObj.addListener('testEventEmitted', res => {
   console.log('this is the result from the emitted event:', res);
});

//now call the method that emits the event in the class
eventEmitterObj.emitterMethod();

```

Now run the `listener.js -> node listerner.js`

> 
> Apologies, if I have explained things way too elaborate
> 
> 
>
just another example of node.js event listener in another source file typescript styles.

```
// file 1 (whatever.ts)
import EventEmitter from "events";
const MyEvent = new EventEmitter();
...
// somewhere fire event 
MyEvent.emit('push', 'message', {
  data: somedata
})
// end of file
export const MyEvents = MyEvent;

```

then in file 2

```
 // note the .js as eslint will cry 
 import { MyEvents  }  from '../whatever.js'
...
MyEvents.on('push', function(event, data) {
  console.log(event);
  console.log(data);
 // do stuff
});

```