Writing Data to the Console

One of the most useful modules in Node.js is the console module. This module provides a lot of functionality for writing debug and information statements to the console. The console module allows you to control output to the console, implement time delta output, and write tracebacks and assertions to the console. This section covers using the console module, which you need to know how to use in later chapters of the book.

Since the console module is so widely used, you do not need to load it into your modules by using a require() statement. You simply call the console function by using console.<function>(<parameters>). Table 3.3 lists the functions available in the console module.

Image
Image

Table 3.3 Member functions of the console module

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.67.125