Notes for CSCI 240

Alerts

Alerts are nice little pop-ups that appear in browsers and are usually annoying but can be helpful when you are actually making the site.

It is simply a function alert(), that you pass a string into and it makes the alert happen:

alert("String");
Test

Console.log()

Instead of debugging with alerts, you can also have output go into the console, which are much less invasive for someone else viewing your site.

You can access the console by right clicking and selecting Inspect and then selecting Console.

It also is a function console.log(), that you pass a string into:

console.log("String");
Test