JavaScript Multiple color change in console.log? multiple personality eye color change,select2 multiple change color,multiple

I just read this SO question/answer and it said to change the color, use

console.log("%cYour Message Here", "color:(your color);font-weight:bold;");

I have tested this and messed around with it a bit, and changed it to

console.log("Test\n\n%cTest\n\nTest", "color:red;font-weight:bold;");

this outputs (where the bolded text is also red)

Test

Test

Test

Is there a way to cause the output (where bold is red and italics is blue)

Test

Test

Test

Answer:1
console.log("Test\n\n%cTest\n\n%cTest", "color:red;", "color:blue;");

I do however feel that the following is much more readable.

console.log("Test");
console.log("%cTest", "color:red");
console.log("%cTest", "color:blue");

Check https://developer.chrome.com/devtools/docs/console-api#consolelogobject-object for a full reference.

Answer:2

I'm using BackboneJS to populate my table with multiple data sources. You do not need to know Backbone to assist in this question, as the issue is mainly a DataTables issue. I initialise my Datatable ...

I'm using BackboneJS to populate my table with multiple data sources. You do not need to know Backbone to assist in this question, as the issue is mainly a DataTables issue. I initialise my Datatable ...

I have a problem in dealing with PostgreSQL BYTEA type in Sails.js. Table definition (yes it is odd to create binary PK, but some_data is always small): CREATE TABLE data_blobs ( some_data BYTEA ...

I have a problem in dealing with PostgreSQL BYTEA type in Sails.js. Table definition (yes it is odd to create binary PK, but some_data is always small): CREATE TABLE data_blobs ( some_data BYTEA ...

  1. getting bytes from file java
  2. getting bytes from string c#
  3. getting bytes from nsdata
  4. getting bytes from string java
  5. getting bytes from inputstream

I'm using fetch API to call query the server in my React Native Application. But, My application taking 50 seconds to call then function after receiving the response from the server. Am I doing any ...

I'm using fetch API to call query the server in my React Native Application. But, My application taking 50 seconds to call then function after receiving the response from the server. Am I doing any ...

  1. taking much time
  2. taking too much time off work
  3. taking too much time synonym
  4. taking too much time
  5. taking too much time to boot
  6. taking so much time
  7. taking too much time to poop
  8. without taking much time
  9. taking too much time to shut down
  10. taking too much time off
  11. taking too much time to build gradle
  12. taking to much time off work
  13. taking too much time off work when pregnant
  14. gridview taking much time to load
  15. not taking much time
  16. taking too much time to die...no mercy
  17. taking too much time to create apple id
  18. taking too much time to eat
  19. not taking much time synonym
  20. taking too much time in decision making

I have a task that has a few rules. Basically, I am separating a number into groups of 3. If the last group only has 1 digit in it, then the last 2 groups have 2 digits instead of 1 group of 3 and 1 ...

I have a task that has a few rules. Basically, I am separating a number into groups of 3. If the last group only has 1 digit in it, then the last 2 groups have 2 digits instead of 1 group of 3 and 1 ...

  1. javascript regex conditional replace
  2. javascript regex conditional group
  3. javascript regex conditional
  4. javascript regex conditional match
  5. javascript regex conditional operator
  6. javascript regex conditional statement
  7. js regex conditional