17 lines
978 B
Plaintext
17 lines
978 B
Plaintext
== The Console tab
|
|
|
|
In the console tab you can see anything, which a loaded JavaScript file may have printed out to it.
|
|
Do not worry if you see something in red. While that is an error, it has probably resolved itself.
|
|
Through the console tab, it is also possible for you to run your own line of JavaScript code.
|
|
|
|
Start by clearing console using the shortcut `CTRL+L`.
|
|
|
|
To run your own JavaScript, simply click inside of the console and write something like:
|
|
`console.log("Hello WebGoat!");` Hit enter. Hello WebGoat should now appear in your console.
|
|
The console also allows you to do some basic arithmetic. If you type for example `1+3` and hit
|
|
enter the console should display 4.
|
|
|
|
Note: You may see an `undefined` in the console. You can safely ignore this statement,
|
|
it only means, that the JavaScript function you have called did not return anything, therefore `undefined`.
|
|
|
|
image::images/ChromeDev_Console_Ex.jpg[DeveloperToolsConsoleExample,500,500,style="lesson-image"] |