Output

Output

Output

Function

output is used to write values to the console. It is often used to debug scripts, view running results, or generate command line output.

print

print outputs content without automatic line wrapping.

Syntax

Examples

println

println outputs the content and breaks the line at the end, which is more suitable for debugging and logging.

Syntax

Examples

echo

echo is a system output function, which will convert all parameters into strings, connect them with spaces and output them.

Syntax

Examples

Return Value

print and println are language output statements, which will return the output value; echo is a system function, and empty will be returned after the output is completed.