Computer scienceBackendNode.jsCore ConceptsInternal modulesEventsEvents module basics

Intro to events module

Order of Methods

Report a typo

You are given a piece of code. Put the lines in the correct sequence so that the callback will work and print the text to the console (don't forget about indentation).

Reorder lines using drag or arrows. Adjust indentation with left buttons
                emitter.emit('logging');
              
                })
              
                emitter.on('logging', () => {
              
                console.log('I am a listener!');
              
___

Create a free account to access the full topic