Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

console.log javascript

console.log(10);
console.log('You can also log numbers')
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

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

//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

javascript console.log

console.log('I want to log this so I am logging this. Calm down and log.')
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

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

let num = 5;
console.log(num);
// 5
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 :: htmlfor jsx attr 
Javascript :: scrollout js 
Javascript :: comment in js 
Javascript :: transform date to relative date js 
Javascript :: jscrollpane set background color 
Javascript :: how to calculate bmi 
Javascript :: Icons library in react 
Javascript :: Unable to resolve "@react-native-community/masked-view" from 
Javascript :: wait for loop to finish javascript 
Javascript :: javascript search after user stops typing 
Javascript :: how to start node server 
Javascript :: reverse a string javascript 
Javascript :: ismobile react 
Javascript :: remove object property javascript es6 
Javascript :: javascript get cpu cores 
Javascript :: javascript save data to local storage 
Javascript :: async storage react native 
Javascript :: js event target 
Javascript :: if element has class jquery 
Javascript :: d3 paning 
Javascript :: video conferencing app with html and js 
Javascript :: js push array 
Javascript :: react get route params 
Javascript :: javascript objects 
Javascript :: how to create two dimensional array in js 
Javascript :: react native expo flatlist 
Javascript :: redux saga use navigation 
Javascript :: check if form bootstrap is valid js 
Javascript :: monaco editor events 
Javascript :: charcodeat javascript 
ADD CONTENT
Topic
Content
Source link
Name
4+1 =