[][src]Static p5_sys::global::print

pub static print: PrintInternalType

The print() function writes to the console area of your browser. This function is often helpful for looking at the data a program is producing. This function creates a new line of text for each call to the function. Individual elements can be separated with quotes ("") and joined with the addition operator (+).

Note that calling print() without any arguments invokes the window.print() function which opens the browser's print dialog. To print a blank line to console you can write print('\n').

Examples

let x = 10;
print('The value of x is ' + x);
// prints "The value of x is 10"

Parameters

contents any combination of Number, String, Object, Boolean, Array to print