Journal de la console JS avec couleur
console.log('%c Oh my heavens! ', 'background: #222; color: #bada55');
If-dev
console.log('%c Oh my heavens! ', 'background: #222; color: #bada55');
console.log('%c My txt ', 'My css');
// Example
console.log('%c Hello world ', 'background: #222; color: #bada55');
// 1. Pass the css styles in an array
const styles = [
'color: green',
'background: yellow',
'font-size: 30px',
'border: 1px solid red',
'text-shadow: 2px 2px black',
'padding: 10px',
].join(';'); // 2. Concatenate the individual array item and concatenate them into a string separated by a semi-colon (;)
// 3. Pass the styles variable
console.log('%cHello There', styles);