Javascript newbie


I'm brand new to Javascript . Learning the terminology is challenging.
Can someone explain console.log and its purpose?


As far as i know it is used for debugging, it shows the code you want, in the console. In firefox if you press f12 you can see the console for example.


The JavaScript Console is, as @cssblaster73027 points out, a debugging console that comes with a command line, (which we don’t see in the Exercise IDE) a command line interpreter/compiler driven by the JavaScript engine of the browser, and a terminal display that displays ANSI characters.

When we Save and Submit our exercise, it is given to the interpreter through the command line and executes immediately. We see the text output (if any) in the display.

There are two kinds of output, as a result. The kind we command with console.log() and the kind the compiler issues as a final response at the end of a script run. In the Exercise IDE we cannot tell these apart. It can be confusing when output we didn’t command appears on the display. Not to worry. We can ignore it.

The command line is hidden in the Exercise IDE but we can get a feel for it labs The lab version of the JavaScript Console includes an editor window (which is not a part of the console environment, but added for our convenience) similar to the Exercise editor we work on lessons in.

There is also the added benefit of a code linter that gives us cautions and warnings when a line of code is not correct or has a small issue.

The output display is color highlighted and has both a command line prompt, > and a response token, =>. This makes a great environment to work on our lesson code without an SCT present.