Fixed typo (#36048)

pull/26086/head^2
Sanket Mishra 2019-05-17 15:16:43 +05:30 committed by Oliver Eyton-Williams
parent 4724c7f5d9
commit 5040c2e1ca
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ eventEmitter.emit(eventName, optionalData);
And the ability to attach a listener function and define the name of a specific event is done by `.on`.
```js
eventEmitter.emit(eventName, callback);
eventEmitter.on(eventName, callback);
```
We will mimic the new functions we just learned about with an example. Create a new file called `eventemitter.js` and paste the following code: