2

I want to console log a string, say for example " Ajey Charantimath".

But I want to make it appear all fancy in the console of the browser.

Examples to check out- 1) https://www.khanacademy.org. (Open the console in the browser and you can see a fancy font of the string "Khan Academy" 2) http://www.flipkart.com/ (same log in the console)

I know this can be achieved by doing a console log in the application and trying to align the characters and stuff.

But is there an automated way of achieving this ? Wherein I will just enter the string and its formatted in the correct way?

Ajey
  • 7,924
  • 12
  • 62
  • 86
  • 1
    Look for ASCII generators, here is one example: http://www.network-science.de/ascii/, and here is another: http://patorjk.com/software/taag/#p=display&f=Graffiti&t=Type%20Something%20 – kamituel Jul 30 '14 at 06:37

3 Answers3

5

You can take a look at this awser. By starting your message with %c, you can add style in the second parameter of console.log().

Example:

console.log('%cAjey Charantimath', 'background: red; color: white');
Community
  • 1
  • 1
Thijs
  • 3,015
  • 4
  • 29
  • 54
1

you can also use image to create ascii art for you try http://www.ascii-art-generator.org/

Usman Khawaja
  • 809
  • 14
  • 28
0

That's ASCII art. You can either generate it by hand or use a library, for example jsascii as suggested in this blog post.

David
  • 5,481
  • 2
  • 20
  • 33