Summary
In this chapter, we talked about the event system in JavaScript and how we can use the built-in events
module to create our own event emitters. Later, we went over a few useful built-in modules and their sample usage. Using event-driven programming can help us avoid interlaced logic when we are writing a program that requires multiple components to communicate with each other. Also, by using built-in modules, we can avoid adding modules that provide the same functionality and avoid creating projects with huge dependencies. We also mentioned how we can use timers to control program execution, fs
to manipulate files, and path
to combine and get useful information about our file path. These are all very useful modules that can help us later when building applications. In the next chapter, we will go over how we can use functional programming in JavaScript.