log

console.log(format, data1, data2...)

Writes specified data to the trace. If the first argument is a formatted string, the output will be formatted according to it. Data is any of the following types: string, number, boolean, array, and object.

ParametersDescription
formatOptional. If the first argument is a formatted string, the output will be formatted according to it.
dataNAny of the types: string, number, boolean, array, object.
#Example
console.log("hello", "goodbye", [1,2,3]);
hello", "goodbye", [1,2,3]
Example
var name = "Niki";
var course = "Design";
var courseNumber = 101;

console.log("Student %s is taking %s %d course.", name, course, courseNumber);
Student Niki is taking Design 101 course.