Check the full documentation here.
The Console API provides functionality to allow developers to perform debugging tasks, such as logging messages or the values of variables at set points in your code, or timing how long an operation takes to complete.
The Console API started as a largely proprietary API, with different browsers implementing it in inconsistent ways. The Console API specification was created to define consistent behavior.
Usage is very simple — the console object contains many methods that you can call to perform rudimentary debugging tasks.
The most commonly used method is console.log() .