log.console code example

Example 1: how to log something in the console. javascript

console.log('https://discord.gg/5yjWgMS');

Example 2: console.log

console.log("Hello, world.");
// Hello, world.

let num = 5;
console.log(num);
// 5

Example 3: js log to console

console.log('this string will show on console') // this string will show on console

const strVar1 = 'fizz';
const strVar2 = 'buzz';

console.log('strVar1 is: ' + strVar1 + ' and strVar2 is: ' + strVar2) // strVar1 is: fizz and strVar2 is: buzz
console.log(420) // 420

Example 4: console.log

console.log("");

Example 5: console.log

var players = ['Jim', 'Shawna', 'Andrew', 'Lora', 'Aimee', 'Nick'];
console.log(players);