The sleepy programmer did not notice how he fell asleep on the keyboard! In the morning, he saw that the code that greeted the person with the name in the userName variable was corrupted. Help him recover the code in the indicated places.
Intro to events module
Consequences of lack of sleep
Report a typo
Write a program in JavaScript
const EventEmitter = require('events'); //do not change this line!
const emitter = new EventEmitter();
emitter.on('greeting', (name) => {
console.log(`Good morning, ${}!`); // this line is corrupted
});
const userName = 'Boris';
emitter.emit('greet", ); // this line is corrupted
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.