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.
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
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.