console.log() in javascript code example

Example 1: how to print to console javascript

console.log("string")

Example 2: console.log javascript

console.log(10);
console.log('You can also log numbers')

Example 3: how to log to the console javascript

console.log('What you want to log here.');

Example 4: javascript log to console

const varName = 'this variable';

console.log(varName);

Example 5: how to use js console log

console.log('string');

Example 6: javascript console.log

console.log('I want to log this so I am logging this. Calm down and log.')