Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

console.log

console.log('zama')
Comment

console.log

// In addition to TopHacker's answer 
console.assert(/** Condition **/, /** Error message **/); 
console.trace(); 
debugger; // will force execution halt at the line where this is written allowing code inspection 


Comment

console log

var a=10;
var b=20;
console.log(a);
// Expected output: 10
console.log(b);
// Expected output: 20
console.log(a,b);
// Expected output: 10 20
Comment

console log

//how to see js output in browser console
//string 
console.log("hello"); // hello 

//number 
console.log(125); //125

//variable 
let val = "Hi! I am a shahjalal";
console.log(val) // Hi! I am shahjalal
Comment

console.log

console.log(69)
Comment

console.log

console.log("dale")
Comment

console.log

console.log('Hi there!');
// Prints: Hi there!
Comment

console.log

//return something in the console
console.log(string);

//return something in the console marked as an error
console.error(string);

//return something in the console marked as a warning
console.warn(string);

//return something in the console in a table
console.table([{json strings}];

//clear the console
console.clear();
Comment

console.log

console.log("");
Comment

console.log

console.log(10); // Integer
console.log(true); // Boolean
console.log('String'); // String
Comment

console.log

// console.log("") is usefull for a lot of things

const myNumberOne = 69;
const myNumberTwo = 420;

console.log(myNumberOne + myNumberTwo);

// Example 2

let x = 4;
let y = 2;

console.log(`The difference between x and y is ${x - y}!`)
Comment

console.log object functions js

console.log(Object.getOwnPropertyNames(Math));
//-> ["E", "LN10", "LN2", "LOG2E", "LOG10E", "PI", ...etc ]
Comment

console.log

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

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

console.log object functions js

console.log(Object.getOwnPropertyNames(Math).filter(function (p) {
    return typeof Math[p] === 'function';
}));
//-> ["random", "abs", "acos", "asin", "atan", "ceil", "cos", "exp", ...etc ]
Comment

console.log() Syntax

console.log(message);
Comment

JavaScript console.log()

let sum = 44;
console.log(sum);   // 44
Comment

console.log

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

what is console.log?

console.log('Testing console');
Comment

console log

VS CODE JavaScript (ES6) code snippets:
clg ==> console.log(object);
clo ==> console.log('object :', object);
ccl ==> console.clear(object);
cer ==> console.error(object);
ctr ==> console.trace(object);
clt ==> console.table(object);
cin ==> console.info(object);
cco ==> console.count(label);
Comment

console log

CONSOLE LOG LIKE A PRO:
Put {} to have label value pairs
// e.g console.log({data, name}); returns data: data, name: name

Console.table() puts data in table!

Console.group() ... console.groupEnd() //groups console logs inside these together 

Console.assert only logs if first param falsey!

Console.count keeps track!

console.time and console.timeLog / timeend outputs how long took.

%c first char in string to add custom css:)
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to use brand icons in react 
Javascript :: javascript table functions 
Javascript :: js summation 
Javascript :: define function 
Javascript :: named parameters 
Javascript :: nestjs prisma 
Javascript :: remove first character javascript 
Javascript :: react query 
Javascript :: string to code javascript 
Javascript :: validation input javascript 
Javascript :: javascript string methods cheat sheet 
Javascript :: time difference in javascript 
Javascript :: web storage api 
Javascript :: create your own programming language in javascript 
Javascript :: binance js 
Javascript :: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 
Javascript :: js str split 
Javascript :: multiple images on cloudinary 
Javascript :: angular auth guard 
Javascript :: jsonl parser 
Javascript :: word table to json 
Javascript :: firebase integration in react 
Javascript :: Javascript get / print current path 
Javascript :: backbone js 
Javascript :: cookie-parser get cookie 
Javascript :: jq append value to array 
Javascript :: jquery callback function example 
Javascript :: react facebook login 
Javascript :: useeffect cleanup function 
Javascript :: How do I use for-loops js 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =