Loading

T8 Node.js · Lesson 5

Games: Events and streams

Choose the right option, fill in the blanks, write small pieces of code and fix broken ones. Code runs in a safe box inside this page.

Solved 0 of 49 items in this lesson.

1 / 25

This runs in the shop's folder, /home/asha/shop. What does it print?

cat > app.js <<'END'
const EventEmitter = require("events");
const e = new EventEmitter();
e.on("x", (a, b) => console.log(a * b));
e.emit("x", 3, 4);
END
node app.js

Back to the lesson