JavaScript Content
JavaScript unofficially is comprised of 2 parts.
The language itself, or the 'Logic' core part, and a bunch of methods that deal with DOM manipulation (those are called Web API's). How to deal with HTML elements and CSS properties in other words.
The logic part is mandatory to learn in order to make the necessary calculations, transformations or alteration in terms of data, make decisions, execute code periodically and many more.
In order to print these results for debugging purposes, a developer normally uses browser's console.
Attention: The logic part is necessary to be mastered before proceeding to the presentation part, since the latter uses many, if not all the functionalities of the first part to do it's job.
Once the logic part is mastered instead of presenting the results to console and to ourselves we need to learn how to present them to the end user, by appending the result to the page.
This is done by the 'presentation' part or better the Web API's part.