Messaging

Alert

Alert a message to the browser.

alert('You are being alerted!');

Confirm

Open a confirmation message in the browser.

if( confirm('Are you sure?') )
{
    // Continue...
}

Console Log

Log text or objects to the console.

// Text
console.log( 'loggin text here' );

// Object
console.log( myObj );

// Testing for 'window.console' prevents errors
// in browsers without console.
window.console && console.log('hello');