Animations

API

Arrays

Async

Basics

Challenges

Classes

Console

Dates

Debugging

DOM Elements

DOM Methods

DOM Navigation

DOM Properties

Event Listeners

Flow Control

Forms

Functions

Global Functions

JSON

Keywords

Libraries (3rd party)

Math

Modules

Objects

Snippets

String

Types

Widgets

Window Object

JavaScript - Console

The Console object provides access to the browser's debugging console.

  • clear() - Clears the console
  • error() - Outputs an error message to the console
  • info() - Outputs an informational message to the console
  • log() - Outputs a message to the console
  • warn() - Outputs a warning message to the console
  • dir() - Outputs an object

 


console.log("This is a message");
console.info("This is a info message");
console.warn("This is a warning message");
console.error("This is a error message");
console.log("This is a message with overloads...but just use string templates. ", "My message");