Console.log print character drawing on console

Source: Internet
Author: User

51 is too busy to study this ...

Requires software
  • Sublime Text
  • ASCII Generator

Steps

Use the ASCII Generator generated characters to draw, copy to the JS file, directly console.info out.

Of course it can't be so smooth.

Uncaught syntaxerror:unexpected Token illegal

The reason is that the character painting contains a "carriage return line break", you must know the whole day to hit the code, you can not recognize the return to the \n line.

So many lines one by one \n is too slow, then the artifact sublime the appearance.

As you already know, you 中键 can choose multiple lines in sublime (that is, rollers):

Select multiple lines at the same time \n , then press the home key to move the cursor to the beginning of the line, delete "carriage return"!

Gaocheng, the character draw has become a line of code!

Now take it console.info out and see it!

demo:https://jsfiddle.net/gallenhu/2ntgs5wy/

This article was posted in: http://blog.hinpc.com Reprint please specify the source

Console.log print character drawing on console

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.