User Program Communication

Console Output in JavaScript

Used to output values or text to the console.


Syntax
console.log("Put your text here" + variable);

Notes

The plus sign concatenates variables and string literals. The comma sign also concatenates strings and variables, adding an automatic space.


Example
var name = "Brendan";
console.log("Hello, " + name + "!"); //will output 'Hello, Brendan!'

See Also
Documentation

Console.log() - MDN

Add to Slack

< For Each   |   Commenting >

© 2019 SyntaxDB. All Rights Reserved.