// 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
//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
//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();
// 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}!`)
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:)