Method

Method

static

log(...o)

Logs the given parameters to the output.

Takes an optional URL or browser settings parameter. See the examples below.

Examples

console.log("hello"); // Displays: 'hello'
console.log("ello", "ello"); // Displays: 'ello ello'
var x = 1;
console.log("x:", x); // Displays: 'x: 1'
var x = 1;
var y = 2;
console.log("x:", x, " y: ", y); // Displays: 'x: 1 y: 2'
console.log({ a: 'b'}); // Displays: '{a: "b"}'

Parameter

Name Type Optional Description

o

Object

 

The objects to print

Value can be repeated.