console.log() is an extremely useful tool for outputting debug without having to use alerts; but there are some other methods that you can use to output information to ease viewing in the console.

console.log() will work printf style. So you can do things like this: console.log("%s is %d years old.", "Bob", 42).

You can use to output information messages; console.debug() to output debug messages; console.warn() to output warning messages and console.error() to output error messages.

You may also use the %c pattern to use the second argument as a style formatting parameter. For example: console.log("%cThis is green text on a yellow background.", "color:green; background-color:yellow");.

Firebug will show different icons for these variations, as well as box the messages in colorful backgrounds.

Firefox will show a small grey icon next to info, warn and error messages to signal that they may require further attention. Firefox does not show anything different for debug - according to MDN it has been deprecated in Firefox in favour of console.log()

Chrome and Safari (nightly) will not show an icon for info, but will show a blue icon for debug; a yellow icon for warn and a red icon for error.

You can output multiple values to any of these logging methods by separating your values with a comma, which can be handy for including objects and arrays on the same line. For example: console.log('Kings: ', kings);.